table of contents
other versions
- wheezy 3.44-1
- jessie 3.74-1
- jessie-backports 4.10-2~bpo8+1
- testing 4.10-2
- unstable 4.10-2
GETPAGESIZE(2) | Linux Programmer's Manual | GETPAGESIZE(2) |
NAME¶
getpagesize - get memory page sizeSYNOPSIS¶
#include <unistd.h>Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
- Since glibc 2.12:
-
_BSD_SOURCE || !(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
-
Before glibc 2.12: -
_BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
DESCRIPTION¶
The function getpagesize() returns the number of bytes in a memory page, where "page" is a fixed-length block, the unit for memory allocation and file mapping performed by mmap(2).CONFORMING TO¶
SVr4, 4.4BSD, SUSv2. In SUSv2 the getpagesize() call is labeled LEGACY, and in POSIX.1-2001 it has been dropped; HP-UX does not have this call.NOTES¶
Portable applications should employ sysconf(_SC_PAGESIZE) instead of getpagesize():#include <unistd.h> long sz = sysconf(_SC_PAGESIZE);
SEE ALSO¶
mmap(2), sysconf(3)COLOPHON¶
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.2010-11-16 | Linux |