1. Tech

Your suggestion is on its way!

An email with a link to:

http://linux.about.com/library/cmd/blcmdl2_getpagesize.htm

was emailed to:

Thanks for sharing About.com with others!

Linux / Unix Command: getpagesize
Command Library

NAME

getpagesize - get memory page size  

SYNOPSIS

#include <unistd.h>

int getpagesize(void);  

DESCRIPTION

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();
 

SEE ALSO

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

You can opt-out at any time. Please refer to our privacy policy for contact information.

Discuss in my forum

©2014 About.com. All rights reserved.