getpagesize(2) System Calls Manual getpagesize(2) getpagesize - C (libc, -lc) #include int getpagesize(void); glibc (. feature_test_macros(7)): getpagesize(): glibc 2.20: _DEFAULT_SOURCE || ! (_POSIX_C_SOURCE >= 200112L) glibc 2.12 glibc 2.19: _BSD_SOURCE || ! (_POSIX_C_SOURCE >= 200112L) glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE >= 500 getpagesize() , <<>> , , mmap(2). A user program should not hard-code a page size, neither as a literal nor using the PAGE_SIZE macro, because some architectures support multiple page sizes. This manual page is in section 2 because Alpha, SPARC, and SPARC64 all have a Linux system call getpagesize() though other architectures do not, and use the ELF auxiliary vector instead. . 4.2BSD, SVr4, SUSv1. In SUSv2 the getpagesize() call was labeled LEGACY, and it was removed in POSIX.1-2001. glibc 2.0 returned a constant even on architectures with multiple page sizes. mmap(2), sysconf(3) () Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () . Linux man-pages 6.18 8 2026 . getpagesize(2)