diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-10-15 22:37:02 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-10-19 14:42:35 +0200 |
commit | 361877454fe56c95a995d5bdbb7eb70c21e39d62 (patch) | |
tree | 51f75a8ab66ece247dbbec3c673409028bdbec74 /linux/LinuxProcess.c | |
parent | 0db398d4c3472071b2814505242450cd8f831501 (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 'linux/LinuxProcess.c')
-rw-r--r-- | linux/LinuxProcess.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index 6d1e3ca6..8003157c 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -215,11 +215,11 @@ void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field) } case CMINFLT: Process_colorNumber(str, lp->cminflt, coloring); return; case CMAJFLT: Process_colorNumber(str, lp->cmajflt, coloring); return; - case M_DRS: Process_humanNumber(str, lp->m_drs * PAGE_SIZE_KB, coloring); return; - case M_DT: Process_humanNumber(str, lp->m_dt * PAGE_SIZE_KB, coloring); return; - case M_LRS: Process_humanNumber(str, lp->m_lrs * PAGE_SIZE_KB, coloring); return; - case M_TRS: Process_humanNumber(str, lp->m_trs * PAGE_SIZE_KB, coloring); return; - case M_SHARE: Process_humanNumber(str, lp->m_share * PAGE_SIZE_KB, coloring); return; + case M_DRS: Process_humanNumber(str, lp->m_drs * CRT_pageSizeKB, coloring); return; + case M_DT: Process_humanNumber(str, lp->m_dt * CRT_pageSizeKB, coloring); return; + case M_LRS: Process_humanNumber(str, lp->m_lrs * CRT_pageSizeKB, coloring); return; + case M_TRS: Process_humanNumber(str, lp->m_trs * CRT_pageSizeKB, coloring); return; + case M_SHARE: Process_humanNumber(str, lp->m_share * CRT_pageSizeKB, coloring); return; case M_PSS: Process_humanNumber(str, lp->m_pss, coloring); return; case M_SWAP: Process_humanNumber(str, lp->m_swap, coloring); return; case M_PSSWP: Process_humanNumber(str, lp->m_psswp, coloring); return; |