Simplify page size related calculations

This commit is contained in:
Christian Göttsche 2020-11-21 19:13:49 +01:00 committed by BenBE
parent fa002c0ba9
commit 0f4e3ebc95
2 changed files with 2 additions and 2 deletions

View File

@ -442,7 +442,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
}
}
proc->m_virt = kproc->kp_vm_map_size / 1024 / pageSizeKb;
proc->m_virt = kproc->kp_vm_map_size / pageSize;
proc->m_resident = kproc->kp_vm_rssize;
proc->nlwp = kproc->kp_nthreads; // number of lwp thread
proc->time = (kproc->kp_swtime + 5000) / 10000;

View File

@ -543,7 +543,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
}
// from FreeBSD source /src/usr.bin/top/machine.c
proc->m_virt = kproc->ki_size / 1024 / pageSizeKb;
proc->m_virt = kproc->ki_size / pageSize;
proc->m_resident = kproc->ki_rssize;
proc->nlwp = kproc->ki_numthreads;
proc->time = (kproc->ki_runtime + 5000) / 10000;