getpagesize() — Get the current page size
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 | both |
Format
#define _XOPEN_SOURCE_EXTENDED 1
#include <unistd.h>
int getpagesize(void);
General description
The getpagesize() function returns the current page size. The getpagesize() function is equivalent to sysconf(_SC_PAGE_SIZE) and sysconf(_SC_PAGESIZE).
This function is kept for historical reasons. It was part of the Legacy Feature in Single UNIX Specification, Version 2, but has been withdrawn and is not supported as part of Single UNIX Specification, Version 3. New applications should use sysconf(_SC_PAGESIZE) instead of getpagesize().
If it is necessary to continue using this function in an application written for Single UNIX Specification, Version 3, define the feature test macro _UNIX03_WITHDRAWN before including any standard system headers. The macro exposes all interfaces and symbols removed in Single UNIX Specification, Version 3.
Returned value
getpagesize() returns the current page size.