mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 18:59:37 +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 @@ nopgrp:
|
||||
(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 New Issue
Block a user