lestes::std::mem::gc Class Reference

Garbage collector. More...

#include <gc.hh>

List of all members.

Static Public Member Functions

static ulint live_roots (void)
 Returns number of live root pointers.
static ulint live_keystones (void)
 Returns number of live keystones.
static void run (void)
 Runs garbage collection.

Private Member Functions

 gc (const gc &)
 Hides copy constructor.
gcoperator= (const gc &)
 Hides assignment operator.

Static Private Member Functions

static void init (void)
 Initializes static variables.
static void cleanup (void)
 Performs cleanup of static variables.

Static Private Attributes

static ulint initialized = 0
 Guard flag to prevent multiple initialization.
static root_pointerroots
 Doubly linked list of all root pointers.
static keystonekeystones
 Singly linked list of all keystones.
static keystonemarked
 Singly linked list of marked keystones.

Friends

class init_gc
 Initializer accesses gc private methods.
class root_pointer
 Root pointer accesses gc private fields for speed.
class keystone
 Keystone accesses gc private fields for speed.


Detailed Description

Garbage collector.

Provides garbage collector functionality.


Constructor & Destructor Documentation

lestes::std::mem::gc::gc ( const gc  )  [private]

Hides copy constructor.


Member Function Documentation

ulint lestes::std::mem::gc::live_roots ( void   )  [static]

Returns number of live root pointers.

Counts live root pointers.

Returns:
The number of live root pointers.

ulint lestes::std::mem::gc::live_keystones ( void   )  [static]

Returns number of live keystones.

Counts live keysones.

Returns:
The number of live keystones.

void lestes::std::mem::gc::run ( void   )  [static]

Runs garbage collection.

Runs garbage collection, invoked in new_handler. Should be invoked explicitly after completing task.

void lestes::std::mem::gc::init ( void   )  [static, private]

Initializes static variables.

Initializes static fields of gc class. Prevents multiple initialization.

void lestes::std::mem::gc::cleanup ( void   )  [static, private]

Performs cleanup of static variables.

Performs cleanup of static fields of gc class.

TMA: also cleans all remaining objects.

gc& lestes::std::mem::gc::operator= ( const gc  )  [private]

Hides assignment operator.


Friends And Related Function Documentation

friend class init_gc [friend]

Initializer accesses gc private methods.

friend class root_pointer [friend]

Root pointer accesses gc private fields for speed.

friend class keystone [friend]

Keystone accesses gc private fields for speed.


Member Data Documentation

ulint lestes::std::mem::gc::initialized = 0 [static, private]

Guard flag to prevent multiple initialization.

Counter to keep track of number of initializaton objects. Reaches zero only after all initialization objects are destroyed.

root_pointer * lestes::std::mem::gc::roots [static, private]

Doubly linked list of all root pointers.

Start of doubly linked list of all root pointers. Initialized to point to the fake head entry.

keystone * lestes::std::mem::gc::keystones [static, private]

Singly linked list of all keystones.

Start of singly linked list of all keystones. Initially the list is empty.

keystone * lestes::std::mem::gc::marked [static, private]

Singly linked list of marked keystones.

Start of singly linked list of marked keystones. Initially the list is empty.


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:50:16 2007 for lestes by doxygen 1.5.1-20070107