Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions | Variables
gcint.h File Reference
#include "prmon.h"
#include "prgc.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RootFinderStr
struct  CollectorTypeStr

Defines

#define LOCK_GC()   PR_EnterMonitor(_pr_gcData.lock)
#define UNLOCK_GC()   PR_ExitMonitor (_pr_gcData.lock)
#define GC_IS_LOCKED()   (PR_GetMonitorEntryCount(_pr_gcData.lock)!=0)
#define _GCTRACE(x, y)
#define GC_MAX_TYPES   256
#define _GC_TYPE_BUSY   0x1
#define _GC_TYPE_FINAL   0x2
#define _GC_TYPE_WEAK   0x4
#define FREE_MEMORY_TYPEIX   255

Typedefs

typedef struct RootFinderStr
typedef struct CollectorTypeStr CollectorType

Functions

void _PR_InitGC (PRWord flags)
void _MD_InitGC (void)
void PR_CALLBACK _PR_ScanFinalQueue (void *notused)
void_MD_GrowGCHeap (PRUint32 *sizep)
PRBool _MD_ExtendGCHeap (char *base, PRInt32 oldSize, PRInt32 newSize)
void _MD_FreeGCSegment (void *base, PRInt32 len)

Variables

PRLogModuleInfo_pr_msgc_lm
GCInfo _pr_gcData
GCBeginGCHook_pr_beginGCHook
void_pr_beginGCHookArg
GCBeginGCHook_pr_endGCHook
void_pr_endGCHookArg
GCBeginFinalizeHook_pr_beginFinalizeHook
void_pr_beginFinalizeHookArg
GCBeginFinalizeHook_pr_endFinalizeHook
void_pr_endFinalizeHookArg
int _pr_do_a_dump
FILE_pr_dump_file
PRLogModuleInfo_pr_gc_lm
RootFinder * _pr_rootFinders
CollectorType_pr_collectorTypes

Class Documentation

struct RootFinderStr

Definition at line 87 of file gcint.h.

Class Members
void * arg
GCRootFinder * func
char * name
RootFinder * next
struct CollectorTypeStr

Definition at line 95 of file gcint.h.

Collaboration diagram for CollectorTypeStr:
Class Members
PRUint32 flags
GCType gctype

Define Documentation

#define _GC_TYPE_BUSY   0x1

Definition at line 103 of file gcint.h.

Definition at line 104 of file gcint.h.

#define _GC_TYPE_WEAK   0x4

Definition at line 105 of file gcint.h.

#define _GCTRACE (   x,
  y 
)

Definition at line 63 of file gcint.h.

Definition at line 108 of file gcint.h.

Definition at line 57 of file gcint.h.

#define GC_MAX_TYPES   256

Definition at line 100 of file gcint.h.

Definition at line 55 of file gcint.h.

Definition at line 56 of file gcint.h.


Typedef Documentation

typedef struct RootFinderStr

Definition at line 85 of file gcint.h.


Function Documentation

PRBool _MD_ExtendGCHeap ( char *  base,
PRInt32  oldSize,
PRInt32  newSize 
)

Definition at line 71 of file os2gc.c.

                                                                      {
  /* Not sure about this.  Todd?  */
  return PR_FALSE;
}
void _MD_FreeGCSegment ( void base,
PRInt32  len 
)

Definition at line 72 of file macgc.c.

{
       free(base);
}

Here is the call graph for this function:

void* _MD_GrowGCHeap ( PRUint32 sizep)

Definition at line 57 of file os2gc.c.

{
    void *addr;

    if ( *sizep > MAX_SEGMENT_SIZE )
    {
        *sizep = MAX_SEGMENT_SIZE;
    }

    addr = malloc((size_t)*sizep);
    return addr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 41 of file macgc.c.

{}

Here is the call graph for this function:

Here is the caller graph for this function:

void _PR_InitGC ( PRWord  flags)

Definition at line 297 of file prgcapi.c.

{
    static char firstTime = 1;

    if (!firstTime) return;
    firstTime = 0;

    _MD_InitGC();

    if (flags == 0) {
       char *ev = PR_GetEnv("GCLOG");
       if (ev && ev[0]) {
           flags = atoi(ev);
       }
    }
    _pr_gcData.flags = flags;

    _pr_gcData.lock = PR_NewMonitor();

    _pr_collectorTypes = (CollectorType*) PR_CALLOC(256 * sizeof(CollectorType));

    PR_RegisterRootFinder(ScanThreads, "scan threads", 0);
    PR_RegisterRootFinder(_PR_ScanFinalQueue, "scan final queue", 0);
}

Here is the call graph for this function:

Definition at line 1385 of file prmsgc.c.

{
#ifdef XP_MAC
#pragma unused (notused)
#endif
    PRCList *qp;
    GCFinal *fp;
    PRWord *p;
    void ( PR_CALLBACK *livePointer)(void *ptr);

    livePointer = _pr_gcData.livePointer;
    qp = _pr_finalQueue.next;
    while (qp != &_pr_finalQueue) {
    fp = FinalPtr(qp);
       _GCTRACE(GC_FINAL, ("marking 0x%x (on final queue)", fp->object));
        p = &fp->object[1];
    (*livePointer)(p);
    qp = qp->next;
    }
}

Here is the caller graph for this function:


Variable Documentation

Definition at line 69 of file prgcapi.c.

Definition at line 70 of file prgcapi.c.

Definition at line 64 of file prgcapi.c.

Definition at line 65 of file prgcapi.c.

Definition at line 59 of file prgcapi.c.

Definition at line 75 of file prgcapi.c.

Definition at line 74 of file prgcapi.c.

Definition at line 71 of file prgcapi.c.

Definition at line 72 of file prgcapi.c.

Definition at line 66 of file prgcapi.c.

Definition at line 67 of file prgcapi.c.

Definition at line 50 of file prinit.c.

Definition at line 62 of file prgcapi.c.

Definition at line 78 of file prmsgc.c.

RootFinder* _pr_rootFinders

Definition at line 57 of file prgcapi.c.