Back to index

glibc  2.9
Functions
getpagesize.c File Reference
#include <unistd.h>
#include <sys/param.h>
#include <errno.h>
#include <ldsodefs.h>
#include <sysdep.h>
#include <sys/syscall.h>

Go to the source code of this file.

Functions

int __getpagesize ()

Function Documentation

int __getpagesize ( void  )

Definition at line 30 of file getpagesize.c.

{
#ifdef __NR_getpagesize
  int result;
#endif

  if (GLRO(dl_pagesize) != 0)
    return GLRO(dl_pagesize);

#ifdef __NR_getpagesize
  INTERNAL_SYSCALL_DECL (err);
  result = INTERNAL_SYSCALL (getpagesize, err, 0);
  /* The only possible error is ENOSYS.  */
  if (!INTERNAL_SYSCALL_ERROR_P (result, err))
    return result;
#endif

  return 4096;
}

Here is the call graph for this function: