1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-09 09:40:42 +00:00

Include altkstack pages in the RSS regardless of whether the process

is swapped out. Pointed out by jhb.
This commit is contained in:
Tim J. Robbins 2003-04-25 00:20:40 +00:00
parent e2527daf1a
commit 913fc94d2b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113993

View File

@ -662,15 +662,13 @@ fill_kinfo_proc(p, kp)
kp->ki_size = vm->vm_map.size;
kp->ki_rssize = vmspace_resident_count(vm); /*XXX*/
if (p->p_sflag & PS_INMEM) {
if (p->p_sflag & PS_INMEM)
kp->ki_rssize += UAREA_PAGES;
FOREACH_THREAD_IN_PROC(p, td0) {
if (!TD_IS_SWAPPED(td0))
kp->ki_rssize += td0->td_kstack_pages;
if (td0->td_altkstack_obj != NULL)
kp->ki_rssize +=
td0->td_altkstack_pages;
}
FOREACH_THREAD_IN_PROC(p, td0) {
if (!TD_IS_SWAPPED(td0))
kp->ki_rssize += td0->td_kstack_pages;
if (td0->td_altkstack_obj != NULL)
kp->ki_rssize += td0->td_altkstack_pages;
}
kp->ki_swrss = vm->vm_swrss;
kp->ki_tsize = vm->vm_tsize;