summaryrefslogtreecommitdiffstats
path: root/libc-bottom-half/headers/public/__macro_PAGESIZE.h
blob: d89222050ca697d23026839a5a02cec6d2a3bacb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef __wasilibc___macro_PAGESIZE_h
#define __wasilibc___macro_PAGESIZE_h

/*
 * The page size in WebAssembly is fixed at 64 KiB. If this ever changes,
 * it's expected that applications will need to opt in, so we can change
 * this.
 *
 * If this ever needs to be a value outside the range of an `int`, the
 * `getpagesize` function which returns this value will need special
 * consideration. POSIX has deprecated `getpagesize` in favor of
 * `sysconf(_SC_PAGESIZE)` which does not have this problem.
 */
#define PAGESIZE (0x10000)

#endif