1. Tech

Your suggestion is on its way!

An email with a link to:


was emailed to:

Thanks for sharing About.com with others!

Linux / Unix Command: getpagesize
Command Library


getpagesize - get memory page size  


#include <unistd.h>

int getpagesize(void);  


The function getpagesize() returns the number of bytes in a page, where a "page" is the thing used where it says in the description of mmap(2) that files are mapped in page-sized units.

The size of the kind of pages that mmap uses, is found using

#include <unistd.h>
long sz = sysconf(_SC_PAGESIZE);

(where some systems also allow the synonym _SC_PAGE_SIZE for _SC_PAGESIZE), or

#include <unistd.h>
int sz = getpagesize();


mmap(2), sysconf(3)

Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

Explore Linux
By Category
    linuxLinuxcomputeTechb0502bb1540001006c84963cb0502bb1540002006c818e0ahttp://linux.about.comod526F6F74132058liveGary Newelllinuxguide3TO004KpzNIP11970-01-0110/od/index.htm0526F6F741approved/od
  1. About.com
  2. Tech
  3. Linux

©2016 About.com. All rights reserved.