Name

getpagesize - get memory page size

Library

libc.lib

Synopsis

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

Detailed description

The getpagesize function returns the number of bytes in a page. Page granularity is the granularity of many of the memory management calls.

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


Examples

#include<unistd.h>
#include<stdio.h>
int test_getpagesize()
{
   int retVal = 0;
   retVal = getpagesize();
   if( retVal >= 0)
   {
      printf("getpagesize passed");
      printf("\n retVal  = %d " retVal);
      return retVal;
   }
   else
   {
   printf("Failed");
   return -1;
   }
}       

         

Output

getpagesize passed
retVal = 4096

         

See also

sbrk

Feedback

For additional information or queries on this page send feedback

© 2005-2007 Nokia

Top