xref: /llvm-project/compiler-rt/test/gwp_asan/page_size.h (revision 21184ec5c48c4a7a108ef8143080fa36c833b8c3)
1 #ifndef PAGE_SIZE_
2 #define PAGE_SIZE_
3 
4 #if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
5 # include <unistd.h>
pageSize()6 unsigned pageSize() {
7   return sysconf(_SC_PAGESIZE);
8 }
9 #else
10 # error "GWP-ASan is not supported on this platform."
11 #endif
12 
13 #endif // PAGE_SIZE_
14