errno-h: document Haiku errors can’t be -1
[gnulib.git] / doc / glibc-functions / getpagesize.texi
blob31e606ce359717785affb7573c9f877e6785fdb8
1 @node getpagesize
2 @subsection @code{getpagesize}
3 @findex getpagesize
5 LSB specification:@* @url{https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/baselib-getpagesize.html}
7 Documentation:
8 @itemize
9 @item
10 @ifinfo
11 @ref{Query Memory Parameters,,How to get information about the memory subsystem?,libc},
12 @end ifinfo
13 @ifnotinfo
14 @url{https://www.gnu.org/software/libc/manual/html_node/Query-Memory-Parameters.html},
15 @end ifnotinfo
16 @item
17 @uref{https://www.kernel.org/doc/man-pages/online/pages/man2/getpagesize.2.html,,man getpagesize}.
18 @end itemize
20 Gnulib module: getpagesize
21 @mindex getpagesize
23 Portability problems fixed by Gnulib:
24 @itemize
25 @item
26 This function is missing on some platforms:
27 MSVC 14, Android 4.4.
28 @item
29 This function is not declared on some platforms:
30 HP-UX 11 with compiler option @code{-D_XOPEN_SOURCE=600}.
31 @item
32 This function is broken on some platforms:
33 mingw.
34 @end itemize
36 Portability problems not fixed by Gnulib:
38 @itemize
39 @item
40 The function has never been in POSIX and was removed from the Single
41 UNIX Specification in SUSv3 (2001).
42 Although portable programs are supposed to use @code{sysconf (_SC_PAGESIZE)}
43 instead, in practice @code{getpagesize} can be a little faster.
45 @item
46 On typical platforms this function's API limits page sizes to at most 1 GiB,
47 even though @code{sysconf (_SC_PAGESIZE)} does not have this limitation.
48 However, this has not been a practical problem yet,
49 and so many programs use @code{getpagesize} that it's unlikely that
50 new platforms would introduce larger page sizes any time soon.
51 @end itemize