tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Unit confusion in kinfo_proc2



On Sun, Jun 03, 2012 at 02:58:15PM +0200, Martin Husemann wrote:
> It seems there is confusion wether a vmpsace vm_map.size element is
> measured in bytes or pages. The uvm code seems to treat it as bytes,
> so I guess we should apply something like this patch?

All the uses I found (building amd64 GENERIC with a renamed field)
showed the kernel expects it to be bytes.
p_vm_vsize is documented as being pages.

The entire source tree only contains 3 references of p_vm_vsize
(including the defn).
The other is:
./lib/libkvm/kvm_proc.c:     kp2p->p_vm_vsize = kp->kp_eproc.e_vm.vm_map.size;

I'm surprised 'ps' can't display it!

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index