struct vmtotal is used by tools like vmstat, systat -vmstat, etc do display basic statistics about memory and run queue.
Currently if one allocate huge amount of virtual memory, the 32 bit counters will overflow causing wrong values to be reported, often as negative numbers.
This patch extends the size of counters to mach the one used to obtain original values. I've separate patches to fix overflows in vmstat and systat but this is the prerequisite.
I tested the compat version with systat and vmstat from 11.1, worked correctly - there was still overflow and the values were displayed using old structure layout.
The only problem I found is with /sbin/sysctl that provides function printing pretty table if vm.vmtotal is queried. In case of older binary it reports vm.vmtotal: sysctl: S_vmtotal 72 != 48 because the size of the structure changed and it checks the size before querying so the compat part isn't used in this case. I'll need some help here how to overcome this is if the sysctl has to be kept accessible using older version of the binary.
This partially fixes PR2137, the rest is related to how systat display large numbers and will be provided in a separate review.