14 lines · c
1#ifndef PAGE_SIZE_2#define PAGE_SIZE_3 4#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))5# include <unistd.h>6unsigned pageSize() {7 return sysconf(_SC_PAGESIZE);8}9#else10# error "GWP-ASan is not supported on this platform."11#endif12 13#endif // PAGE_SIZE_14