summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-20 17:09:34 +0100
committerBenBE <BenBE@geshi.org>2020-11-21 19:39:45 +0100
commitfa002c0ba95929bef65df57a33471682666b46ba (patch)
treef47272951cd6c75be81fdf61c501c14871ef6471
parent3e5cba91ce3c7661e5b6406b1840cdc27d397dc1 (diff)
Rename virtual memory column from M_SIZE to M_VIRT
Closes: #325
-rw-r--r--Process.c6
-rw-r--r--Process.h4
-rw-r--r--darwin/DarwinProcess.c4
-rw-r--r--darwin/Platform.c4
-rw-r--r--dragonflybsd/DragonFlyBSDProcess.c2
-rw-r--r--dragonflybsd/DragonFlyBSDProcessList.c2
-rw-r--r--dragonflybsd/Platform.c2
-rw-r--r--freebsd/FreeBSDProcess.c2
-rw-r--r--freebsd/FreeBSDProcessList.c2
-rw-r--r--freebsd/Platform.c2
-rw-r--r--htop.1.in2
-rw-r--r--linux/LinuxProcess.c2
-rw-r--r--linux/LinuxProcessList.c2
-rw-r--r--linux/Platform.c2
-rw-r--r--openbsd/OpenBSDProcess.c4
-rw-r--r--openbsd/OpenBSDProcessList.c2
-rw-r--r--openbsd/Platform.c2
-rw-r--r--solaris/Platform.c2
-rw-r--r--solaris/SolarisProcess.c2
-rw-r--r--solaris/SolarisProcessList.c2
-rw-r--r--unsupported/Platform.c4
-rw-r--r--unsupported/UnsupportedProcessList.c2
22 files changed, 29 insertions, 29 deletions
diff --git a/Process.c b/Process.c
index eb080f03..ec4d853e 100644
--- a/Process.c
+++ b/Process.c
@@ -326,7 +326,7 @@ void Process_writeField(const Process* this, RichString* str, ProcessField field
case MAJFLT: Process_colorNumber(str, this->majflt, coloring); return;
case MINFLT: Process_colorNumber(str, this->minflt, coloring); return;
case M_RESIDENT: Process_humanNumber(str, this->m_resident * CRT_pageSizeKB, coloring); return;
- case M_SIZE: Process_humanNumber(str, this->m_size * CRT_pageSizeKB, coloring); return;
+ case M_VIRT: Process_humanNumber(str, this->m_virt * CRT_pageSizeKB, coloring); return;
case NICE: {
xSnprintf(buffer, n, "%3ld ", this->nice);
attr = this->nice < 0 ? CRT_colors[PROCESS_HIGH_PRIORITY]
@@ -510,8 +510,8 @@ long Process_compare(const void* v1, const void* v2) {
return SPACESHIP_NUMBER(p2->minflt, p1->minflt);
case M_RESIDENT:
return SPACESHIP_NUMBER(p2->m_resident, p1->m_resident);
- case M_SIZE:
- return SPACESHIP_NUMBER(p2->m_size, p1->m_size);
+ case M_VIRT:
+ return SPACESHIP_NUMBER(p2->m_virt, p1->m_virt);
case NICE:
return SPACESHIP_NUMBER(p1->nice, p2->nice);
case NLWP:
diff --git a/Process.h b/Process.h
index a76161d8..595e2bec 100644
--- a/Process.h
+++ b/Process.h
@@ -38,7 +38,7 @@ typedef enum ProcessFields {
NICE = 19,
STARTTIME = 21,
PROCESSOR = 38,
- M_SIZE = 39,
+ M_VIRT = 39,
M_RESIDENT = 40,
ST_UID = 46,
PERCENT_CPU = 47,
@@ -97,7 +97,7 @@ typedef struct Process_ {
char starttime_show[8];
time_t starttime_ctime;
- long m_size;
+ long m_virt;
long m_resident;
int exit_signal;
diff --git a/darwin/DarwinProcess.c b/darwin/DarwinProcess.c
index b8362da7..f3c34254 100644
--- a/darwin/DarwinProcess.c
+++ b/darwin/DarwinProcess.c
@@ -204,7 +204,7 @@ void DarwinProcess_setFromKInfoProc(Process* proc, const struct kinfo_proc* ps,
* nlwp
* percent_cpu
* percent_mem
- * m_size
+ * m_virt
* m_resident
* minflt
* majflt
@@ -258,7 +258,7 @@ void DarwinProcess_setFromLibprocPidinfo(DarwinProcess* proc, DarwinProcessList*
proc->super.time = (pti.pti_total_system + pti.pti_total_user) / 10000000;
proc->super.nlwp = pti.pti_threadnum;
- proc->super.m_size = pti.pti_virtual_size / CRT_pageSize;
+ proc->super.m_virt = pti.pti_virtual_size / CRT_pageSize;
proc->super.m_resident = pti.pti_resident_size / CRT_pageSize;
proc->super.majflt = pti.pti_faults;
proc->super.percent_mem = (double)pti.pti_resident_size * 100.0
diff --git a/darwin/Platform.c b/darwin/Platform.c
index bf9645b3..fe3505e9 100644
--- a/darwin/Platform.c
+++ b/darwin/Platform.c
@@ -31,7 +31,7 @@ in the source distribution for its full text.
#include <IOKit/ps/IOPowerSources.h>
#include <IOKit/ps/IOPSKeys.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 };
const SignalItem Platform_signals[] = {
{ .name = " 0 Cancel", .number = 0 },
@@ -88,7 +88,7 @@ ProcessFieldData Process_fields[] = {
[STARTTIME] = { .name = "STARTTIME", .title = "START ", .description = "Time the process was started", .flags = 0, },
[PROCESSOR] = { .name = "PROCESSOR", .title = "CPU ", .description = "Id of the CPU the process last executed on", .flags = 0, },
- [M_SIZE] = { .name = "M_SIZE", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
+ [M_VIRT] = { .name = "M_VIRT", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
[M_RESIDENT] = { .name = "M_RESIDENT", .title = " RES ", .description = "Resident set size, size of the text and data sections, plus stack usage", .flags = 0, },
[ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
[PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
diff --git a/dragonflybsd/DragonFlyBSDProcess.c b/dragonflybsd/DragonFlyBSDProcess.c
index 4130e799..9311f03c 100644
--- a/dragonflybsd/DragonFlyBSDProcess.c
+++ b/dragonflybsd/DragonFlyBSDProcess.c
@@ -44,7 +44,7 @@ ProcessFieldData Process_fields[] = {
[NICE] = { .name = "NICE", .title = " NI ", .description = "Nice value (the higher the value, the more it lets other processes take priority)", .flags = 0, },
[STARTTIME] = { .name = "STARTTIME", .title = "START ", .description = "Time the process was started", .flags = 0, },
[PROCESSOR] = { .name = "PROCESSOR", .title = "CPU ", .description = "Id of the CPU the process last executed on", .flags = 0, },
- [M_SIZE] = { .name = "M_SIZE", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
+ [M_VIRT] = { .name = "M_VIRT", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
[M_RESIDENT] = { .name = "M_RESIDENT", .title = " RES ", .description = "Resident set size, size of the text and data sections, plus stack usage", .flags = 0, },
[ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
[PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
diff --git a/dragonflybsd/DragonFlyBSDProcessList.c b/dragonflybsd/DragonFlyBSDProcessList.c
index a584f034..5d72ea48 100644
--- a/dragonflybsd/DragonFlyBSDProcessList.c
+++ b/dragonflybsd/DragonFlyBSDProcessList.c
@@ -442,7 +442,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
}
}
- proc->m_size = kproc->kp_vm_map_size / 1024 / pageSizeKb;
+ proc->m_virt = kproc->kp_vm_map_size / 1024 / pageSizeKb;
proc->m_resident = kproc->kp_vm_rssize;
proc->nlwp = kproc->kp_nthreads; // number of lwp thread
proc->time = (kproc->kp_swtime + 5000) / 10000;
diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c
index c6966c11..5f754d2a 100644
--- a/dragonflybsd/Platform.c
+++ b/dragonflybsd/Platform.c
@@ -31,7 +31,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;
diff --git a/freebsd/FreeBSDProcess.c b/freebsd/FreeBSDProcess.c
index c4568677..d6d67b75 100644
--- a/freebsd/FreeBSDProcess.c
+++ b/freebsd/FreeBSDProcess.c
@@ -35,7 +35,7 @@ ProcessFieldData Process_fields[] = {
[STARTTIME] = { .name = "STARTTIME", .title = "START ", .description = "Time the process was started", .flags = 0, },
[PROCESSOR] = { .name = "PROCESSOR", .title = "CPU ", .description = "Id of the CPU the process last executed on", .flags = 0, },
- [M_SIZE] = { .name = "M_SIZE", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
+ [M_VIRT] = { .name = "M_VIRT", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
[M_RESIDENT] = { .name = "M_RESIDENT", .title = " RES ", .description = "Resident set size, size of the text and data sections, plus stack usage", .flags = 0, },
[ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
[PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c
index 7dd432f5..161f64ba 100644
--- a/freebsd/FreeBSDProcessList.c
+++ b/freebsd/FreeBSDProcessList.c
@@ -543,7 +543,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
}
// from FreeBSD source /src/usr.bin/top/machine.c
- proc->m_size = kproc->ki_size / 1024 / pageSizeKb;
+ proc->m_virt = kproc->ki_size / 1024 / pageSizeKb;
proc->m_resident = kproc->ki_rssize;
proc->nlwp = kproc->ki_numthreads;
proc->time = (kproc->ki_runtime + 5000) / 10000;
diff --git a/freebsd/Platform.c b/freebsd/Platform.c
index f73b48bd..6505f746 100644
--- a/freebsd/Platform.c
+++ b/freebsd/Platform.c
@@ -47,7 +47,7 @@ in the source distribution for its full text.
#include "zfs/ZfsCompressedArcMeter.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;
diff --git a/htop.1.in b/htop.1.in
index 6048449d..f597ea90 100644
--- a/htop.1.in
+++ b/htop.1.in
@@ -312,7 +312,7 @@ The time the process was started.
.B PROCESSOR (CPU)
The ID of the CPU the process last executed on.
.TP
-.B M_SIZE (VIRT)
+.B M_VIRT (VIRT)
The size of the virtual memory of the process.
.TP
.B M_RESIDENT (RES)
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
index c75291ce..6bed3322 100644
--- a/linux/LinuxProcess.c
+++ b/linux/LinuxProcess.c
@@ -65,7 +65,7 @@ ProcessFieldData Process_fields[] = {
[CNSWAP] = { .name = "CNSWAP", .title = NULL, .description = NULL, .flags = 0, },
[EXIT_SIGNAL] = { .name = "EXIT_SIGNAL", .title = NULL, .description = NULL, .flags = 0, },
[PROCESSOR] = { .name = "PROCESSOR", .title = "CPU ", .description = "Id of the CPU the process last executed on", .flags = 0, },
- [M_SIZE] = { .name = "M_SIZE", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
+ [M_VIRT] = { .name = "M_VIRT", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
[M_RESIDENT] = { .name = "M_RESIDENT", .title = " RES ", .description = "Resident set size, size of the text and data sections, plus stack usage", .flags = 0, },
[M_SHARE] = { .name = "M_SHARE", .title = " SHR ", .description = "Size of the process's shared pages", .flags = 0, },
[M_TRS] = { .name = "M_TRS", .title = " CODE ", .description = "Size of the text segment of the process", .flags = 0, },
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index ecf84a79..4f40acad 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -494,7 +494,7 @@ static bool LinuxProcessList_readStatmFile(LinuxProcess* process, const char* di
return false;
int r = fscanf(statmfile, "%ld %ld %ld %ld %ld %ld %ld",
- &process->super.m_size,
+ &process->super.m_virt,
&process->super.m_resident,
&process->m_share,
&process->m_trs,
diff --git a/linux/Platform.c b/linux/Platform.c
index 21d65156..ff20d133 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -62,7 +62,7 @@ in the source distribution for its full text.
#include "zfs/ZfsCompressedArcMeter.h"
-ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, (int)M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, (int)M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
//static ProcessField defaultIoFields[] = { PID, IO_PRIORITY, USER, IO_READ_RATE, IO_WRITE_RATE, IO_RATE, COMM, 0 };
diff --git a/openbsd/OpenBSDProcess.c b/openbsd/OpenBSDProcess.c
index de823ce4..4b79ea36 100644
--- a/openbsd/OpenBSDProcess.c
+++ b/openbsd/OpenBSDProcess.c
@@ -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,
diff --git a/openbsd/OpenBSDProcessList.c b/openbsd/OpenBSDProcessList.c
index aec13477..6b0b3951 100644
--- a/openbsd/OpenBSDProcessList.c
+++ b/openbsd/OpenBSDProcessList.c
@@ -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);
diff --git a/openbsd/Platform.c b/openbsd/Platform.c
index bf045396..57b561e3 100644
--- a/openbsd/Platform.c
+++ b/openbsd/Platform.c
@@ -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;
diff --git a/solaris/Platform.c b/solaris/Platform.c
index 7eff2d5f..ff2e5c61 100644
--- a/solaris/Platform.c
+++ b/solaris/Platform.c
@@ -86,7 +86,7 @@ const SignalItem Platform_signals[] = {
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
-ProcessField Platform_defaultFields[] = { PID, LWPID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+ProcessField Platform_defaultFields[] = { PID, LWPID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
const MeterClass* const Platform_meterTypes[] = {
&CPUMeter_class,
diff --git a/solaris/SolarisProcess.c b/solaris/SolarisProcess.c
index c11c6de8..e0a3db24 100644
--- a/solaris/SolarisProcess.c
+++ b/solaris/SolarisProcess.c
@@ -44,7 +44,7 @@ ProcessFieldData Process_fields[] = {
[NICE] = { .name = "NICE", .title = " NI ", .description = "Nice value (the higher the value, the more it lets other processes take priority)", .flags = 0, },
[STARTTIME] = { .name = "STARTTIME", .title = "START ", .description = "Time the process was started", .flags = 0, },
[PROCESSOR] = { .name = "PROCESSOR", .title = "CPU ", .description = "Id of the CPU the process last executed on", .flags = 0, },
- [M_SIZE] = { .name = "M_SIZE", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
+ [M_VIRT] = { .name = "M_VIRT", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
[M_RESIDENT] = { .name = "M_RESIDENT", .title = " RES ", .description = "Resident set size, size of the text and data sections, plus stack usage", .flags = 0, },
[ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
[PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
diff --git a/solaris/SolarisProcessList.c b/solaris/SolarisProcessList.c
index 49aeb24c..474c0fd1 100644
--- a/solaris/SolarisProcessList.c
+++ b/solaris/SolarisProcessList.c
@@ -323,7 +323,7 @@ int SolarisProcessList_walkproc(psinfo_t* _psinfo, lwpsinfo_t* _lwpsinfo, void*
proc->nlwp = _psinfo->pr_nlwp;
proc->tty_nr = _psinfo->pr_ttydev;
proc->m_resident = _psinfo->pr_rssize / CRT_pageSizeKB;
- proc->m_size = _psinfo->pr_size / CRT_pageSizeKB;
+ proc->m_virt = _psinfo->pr_size / CRT_pageSizeKB;
if (!preExisting) {
sproc->realpid = _psinfo->pr_pid;
diff --git a/unsupported/Platform.c b/unsupported/Platform.c
index 6646398d..5bf1a2de 100644
--- a/unsupported/Platform.c
+++ b/unsupported/Platform.c
@@ -28,7 +28,7 @@ const SignalItem Platform_signals[] = {
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
-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 };
ProcessFieldData Process_fields[] = {
[0] = { .name = "", .title = NULL, .description = NULL, .flags = 0, },
@@ -47,7 +47,7 @@ ProcessFieldData Process_fields[] = {
[STARTTIME] = { .name = "STARTTIME", .title = "START ", .description = "Time the process was started", .flags = 0, },
[PROCESSOR] = { .name = "PROCESSOR", .title = "CPU ", .description = "Id of the CPU the process last executed on", .flags = 0, },
- [M_SIZE] = { .name = "M_SIZE", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
+ [M_VIRT] = { .name = "M_VIRT", .title = " VIRT ", .description = "Total program size in virtual memory", .flags = 0, },
[M_RESIDENT] = { .name = "M_RESIDENT", .title = " RES ", .description = "Resident set size, size of the text and data sections, plus stack usage", .flags = 0, },
[ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
[PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
diff --git a/unsupported/UnsupportedProcessList.c b/unsupported/UnsupportedProcessList.c
index 6c0e0229..098eb488 100644
--- a/unsupported/UnsupportedProcessList.c
+++ b/unsupported/UnsupportedProcessList.c
@@ -65,7 +65,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
proc->starttime_ctime = 1433116800; // Jun 01, 2015
Process_fillStarttimeBuffer(proc);
- proc->m_size = 100;
+ proc->m_virt = 100;
proc->m_resident = 100;
proc->minflt = 20;

© 2014-2024 Faster IT GmbH | imprint | privacy policy