summaryrefslogtreecommitdiffstats
path: root/Process.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-15 22:37:02 +0200
committerChristian Göttsche <cgzones@googlemail.com>2020-10-19 14:42:35 +0200
commit361877454fe56c95a995d5bdbb7eb70c21e39d62 (patch)
tree51f75a8ab66ece247dbbec3c673409028bdbec74 /Process.c
parent0db398d4c3472071b2814505242450cd8f831501 (diff)
Cache PAGE_SIZE
man:sysconf(3) states: The values obtained from these functions are system configuration constants. They do not change during the lifetime of a process.
Diffstat (limited to 'Process.c')
-rw-r--r--Process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Process.c b/Process.c
index 6d9101a7..5f5be13a 100644
--- a/Process.c
+++ b/Process.c
@@ -311,8 +311,8 @@ 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 * PAGE_SIZE_KB, coloring); return;
- case M_SIZE: Process_humanNumber(str, this->m_size * PAGE_SIZE_KB, 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 NICE: {
xSnprintf(buffer, n, "%3ld ", this->nice);
attr = this->nice < 0 ? CRT_colors[PROCESS_HIGH_PRIORITY]

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