Rename virtual memory column from M_SIZE to M_VIRT

Closes: #325
This commit is contained in:
Christian Göttsche
2020-11-20 17:09:34 +01:00
committed by BenBE
parent 3e5cba91ce
commit fa002c0ba9
22 changed files with 29 additions and 29 deletions

View File

@ -118,8 +118,8 @@ ProcessFieldData Process_fields[] = {
.description = "Id of the CPU the process last executed on",
.flags = 0,
},
[M_SIZE] = {
.name = "M_SIZE",
[M_VIRT] = {
.name = "M_VIRT",
.title = " VIRT ",
.description = "Total program size in virtual memory",
.flags = 0,

View File

@ -229,7 +229,7 @@ static inline void OpenBSDProcessList_scanProcs(OpenBSDProcessList* this) {
}
}
proc->m_size = kproc->p_vm_dsize;
proc->m_virt = kproc->p_vm_dsize;
proc->m_resident = kproc->p_vm_rssize;
proc->percent_mem = (proc->m_resident * CRT_pageSizeKB) / (double)(this->super.totalMem) * 100.0;
proc->percent_cpu = CLAMP(getpcpu(kproc), 0.0, this->super.cpuCount * 100.0);

View File

@ -43,7 +43,7 @@ in the source distribution for its full text.
#include <math.h>
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
int Platform_numberOfFields = LAST_PROCESSFIELD;