From 361877454fe56c95a995d5bdbb7eb70c21e39d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Thu, 15 Oct 2020 22:37:02 +0200 Subject: 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. --- Process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Process.c') 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] -- cgit v1.2.3