Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
prosdep.c File Reference
#include "prbit.h"
#include "prsystem.h"

Go to the source code of this file.

Functions

static void GetPageSize (void)
 PR_IMPLEMENT (PRInt32)

Variables

PRInt32 _pr_pageShift
PRInt32 _pr_pageSize

Function Documentation

static void GetPageSize ( void  ) [static]

Definition at line 60 of file prosdep.c.

{
       PRInt32 pageSize;

    /* Get page size */
#ifdef XP_UNIX
#if defined SUNOS4 || defined LINUX || defined BSDI || defined AIX \
        || defined FREEBSD || defined NETBSD || defined OPENBSD \
        || defined DARWIN || defined NEXTSTEP
    _pr_pageSize = getpagesize();
#elif defined(HPUX)
    /* I have no idea. Don't get me started. --Rob */
    _pr_pageSize = sysconf(_SC_PAGE_SIZE);
#else
    _pr_pageSize = sysconf(_SC_PAGESIZE);
#endif
#endif /* XP_UNIX */

#ifdef XP_MAC
    _pr_pageSize = 4096;
#endif /* XP_MAC */

#ifdef XP_BEOS
    _pr_pageSize = B_PAGE_SIZE;
#endif

#ifdef XP_PC
#ifdef _WIN32
    SYSTEM_INFO info;
    GetSystemInfo(&info);
    _pr_pageSize = info.dwPageSize;
#else
    _pr_pageSize = 4096;
#endif
#endif /* XP_PC */

       pageSize = _pr_pageSize;
       PR_CEILING_LOG2(_pr_pageShift, pageSize);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 100 of file prosdep.c.

{
    if (!_pr_pageSize) {
       GetPageSize();
    }
    return _pr_pageShift;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 54 of file prosdep.c.

Definition at line 55 of file prosdep.c.