Back to index

lightning-sunbird  0.9+nobinonly
Functions
prseg.c File Reference
#include "primpl.h"

Go to the source code of this file.

Functions

void _PR_InitSegs (void)
PRSegment_PR_NewSegment (PRUint32 size, void *vaddr)
void _PR_DestroySegment (PRSegment *seg)

Function Documentation

Definition at line 87 of file prseg.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 51 of file prseg.c.

Here is the call graph for this function:

Here is the caller graph for this function:

PRSegment* _PR_NewSegment ( PRUint32  size,
void vaddr 
)

Definition at line 62 of file prseg.c.

{
    PRSegment *seg;

       /* calloc the data structure for the segment */
    seg = PR_NEWZAP(PRSegment);

    if (seg) {
           size = ((size + _pr_pageSize - 1) >> _pr_pageShift) << _pr_pageShift;
              /*
              **     Now, allocate the actual segment memory (or map under some OS)
              **     The OS specific code decides from where or how to allocate memory.
              */
           if (_PR_MD_ALLOC_SEGMENT(seg, size, vaddr) != PR_SUCCESS) {
                     PR_DELETE(seg);
                     return NULL;
       }
       }

    return seg;
}

Here is the call graph for this function:

Here is the caller graph for this function: