]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-bottom-half/headers/public/__macro_PAGESIZE.h
Add a `getpagesize` function. (#300)
[wasi-libc.git] / libc-bottom-half / headers / public / __macro_PAGESIZE.h
index 0243c98c9a1f685c2fe5edf5281d12f4e1b33e76..d89222050ca697d23026839a5a02cec6d2a3bacb 100644 (file)
@@ -5,6 +5,11 @@
  * 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)