mirror of https://github.com/xzeldon/htop.git
Simplify page size related calculations
This commit is contained in:
parent
fa002c0ba9
commit
0f4e3ebc95
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue