copy-file: Add functions for copying non-confidential files.
[gnulib.git] / doc / glibc-functions / getpagesize.texi
blob3c60942742633b3c817dedc5ebb359a877667b12
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
22 Portability problems fixed by Gnulib:
23 @itemize
24 @item
25 This function is missing on some platforms:
26 MSVC 14, Android 4.4.
27 @item
28 This function is not declared on some platforms:
29 HP-UX 11 with compiler option @code{-D_XOPEN_SOURCE=600}.
30 @item
31 This function is broken on some platforms:
32 mingw.
33 @end itemize
35 Portability problems not fixed by Gnulib:
37 @itemize
38 @item
39 The function has never been in POSIX and was removed from the Single
40 UNIX Specification in SUSv3 (2001).
41 Although portable programs are supposed to use @code{sysconf (_SC_PAGESIZE)}
42 instead, in practice @code{getpagesize} can be a little faster.
44 @item
45 On typical platforms this function's API limits page sizes to at most 1 GiB,
46 even though @code{sysconf (_SC_PAGESIZE)} does not have this limitation.
47 However, this has not been a practical problem yet,
48 and so many programs use @code{getpagesize} that it's unlikely that
49 new platforms would introduce larger page sizes any time soon.
50 @end itemize