5 #define _FILE_OFFSET_BITS 64
6 #define _BSD_SOURCE /* for mincore */
7 #define _XOPEN_SOURCE 600 /* for posix_fadvise */
21 #endif /* O_NOATIME */
23 #define PAGE_MASK (~(page_size() -1))
24 #define PAGE_ALIGN(addr) (((addr) + page_size() - 1) & PAGE_MASK)
25 #define PAGE_ALIGN_DOWN(addr) \
26 (addr > page_size() ? PAGE_ALIGN(addr) - page_size() : 0)
28 static inline size_t page_size(void)
33 size
= sysconf(_SC_PAGESIZE
);
38 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
40 #endif /* OS_COMPAT_H */