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.
This commit is contained in:
Christian Göttsche
2020-10-15 22:37:02 +02:00
parent 0db398d4c3
commit 361877454f
11 changed files with 60 additions and 49 deletions

View File

@ -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]