代码如下:
#include<unistd.h>#include<stdio.h>int main(){ int pageSize = getpagesize(); printf("Page size on your system = %i bytes\n", pageSize); return 0;}
编译方法如下:
gcc pagesize.c
运行方法:
./a.out
输出结果:
Page size on your system = 4096 bytes