Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

getpagesize - get current page size

&pagelevel(4)&pagelevel

Syntax

#include <unistd.h>

int getpagesize(void);

Description

getpagesize() returns the number of bytes of a memory page.

A getpagesize() call is equivalent to calling sysconf(_SC_PAGE_SIZE) or sysconf(_SC_PAGESIZE).

getpagesize() is not thread-safe.

Return val.

Current page size

The function is always successful.

Notes

The page size returned by getpagesize() does not have to match the size of the memory pages as divided up for the hardware.
Under POSIX, however, this size is the same as that set for the hardware.

This page size need not match the minimum size that can be requested with malloc(), nor may an application rely on the fact that an object of this size can be allocated with malloc().

See also

brk(), getrlimit(), mmap(), mprotect(), munmap(), msync(), sysconf(), unistd.h.