mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Much closer approximation of the kernel's calculation of this value.
Reviewed by: alc Obtained from: Yahoo Inc.
This commit is contained in:
parent
d3cf8f4b68
commit
5f494640de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209276
|
@ -323,7 +323,12 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
|
|||
(void)kvm_read(kd, (u_long)proc.p_vmspace,
|
||||
(char *)&vmspace, sizeof(vmspace));
|
||||
kp->ki_size = vmspace.vm_map.size;
|
||||
kp->ki_rssize = vmspace.vm_swrss; /* XXX */
|
||||
/*
|
||||
* Approximate the kernel's method of calculating
|
||||
* this field.
|
||||
*/
|
||||
#define pmap_resident_count(pm) ((pm)->pm_stats.resident_count)
|
||||
kp->ki_rssize = pmap_resident_count(&vmspace.vm_pmap);
|
||||
kp->ki_swrss = vmspace.vm_swrss;
|
||||
kp->ki_tsize = vmspace.vm_tsize;
|
||||
kp->ki_dsize = vmspace.vm_dsize;
|
||||
|
|
Loading…
Reference in a new issue