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 /Process.h | |
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 'Process.h')
-rw-r--r-- | Process.h | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -21,13 +21,6 @@ in the source distribution for its full text. #define SYS_ioprio_set __NR_ioprio_set #endif -// On Linux, this works only with glibc 2.1+. On earlier versions -// the behavior is similar to have a hardcoded page size. -#ifndef PAGE_SIZE -#define PAGE_SIZE ( sysconf(_SC_PAGESIZE) ) -#endif -#define PAGE_SIZE_KB ( PAGE_SIZE / ONE_K ) - #define PROCESS_FLAG_IO 0x0001 typedef enum ProcessFields { |