September 2000
Intermediate to advanced
624 pages
14h 32m
English
Memory functions performed by the UNIX kernel are restricted to operating in multiples of the virtual memory (VM) page size. You have already seen this behavior when attaching shared memory. A portable program needs a way to determine what the system's VM page size is, because it varies on different UNIX platforms. The getpagesize(3) function returns this information. The function synopsis for it is as follows:
#include <unistd.h> int getpagesize(void);
The function getpagesize(3) returns the size in bytes of the system page size used.
Note
The page size returned by getpagesize(3) is the size of the system's page size. The page size used by the hardware for virtual memory paging may be different in size.
Read now
Unlock full access