Using sysconf()

The sysconf() interface returns system dependent sizes of memory pages and applications should use the getpagesizes() function to find out which memory pages are available to a running process. For portability, applications should not embed any constants that specify the size of a page. Note that varying page sizes are not unusual, even among implementations of the same instruction set. For more information, see the sysconf(3C) and getpagesizes(3C) man pages.