DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

getpagesize(S)


getpagesize -- get system page size

Synopsis

   #include <unistd.h>
   

int getpagesize(void);

Description

getpagesize returns the number of bytes in a page. This is useful because many of the memory management system calls return values in terms of a page-size aligned boundary.

The getpagesize function is equivalent to

   sysconf(_SC_PAGE_SIZE)
   or
   sysconf(_SC_PAGESIZE)

The page size is a system page size and need not be the same as the underlying hardware page size.

Usage

The value returned by getpagesize need not be the minimum value that malloc can allocate. Moreover, the application cannot assume that an object of this size can be allocated with malloc.

References

brk(S), getrlimit(S), mmap(S), mprotect(S), munmap(S), msync(S), sysconf(S)

Standards conformance

This routine conforms to X/Open System Interfaces and Headers, Issue 4, Version 2.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005