dynamic::gc::garbage_collector Class Reference
[Memory and thread management]

The interface to the garbage collector. More...

#include <gc.hpp>

List of all members.

Public Member Functions

virtual gc_objectchain ()=0
 The linked list of GCed objects.
virtual void mark_reachable (gc_object *)=0
 Indicates to the GC that a particular object is reachable.
virtual void collect ()=0
 Perform a full GC now.
virtual int object_count ()=0
 Return the number of managed objects.
virtual void on_add_object ()=0
 Callback whenever an object is managed by the GC.
virtual void try_idle_gc ()=0
 Hint to the GC that it can collect now if it's appropriate.
virtual void disable ()=0
 Disable all collection.
virtual void enable ()=0
 Called to re-enable GC.
virtual void set_min_objects (int)=0
 Sets the minimum number of objects that trigger a GC.
virtual void set_idle_gc_factor (int)=0
 Sets when GC will next happen, if calling try_idle_gc().
virtual void set_gc_factor (int)=0
 Sets when GC will next happen.


Detailed Description

The interface to the garbage collector.

Definition at line 23 of file gc.hpp.


Member Function Documentation

virtual void dynamic::gc::garbage_collector::disable (  )  [pure virtual]

Disable all collection.

Call enable() again to re-enable GC. This call can be nested, and GC only takes place when the number of enable() calls equals the number of disable() calls.

Referenced by dynamic::gc_disable().

virtual void dynamic::gc::garbage_collector::set_gc_factor ( int   )  [pure virtual]

Sets when GC will next happen.

The default = 30, which means that the heap grows by a factor of 3 before GC kicks in when calling on_add_object()

Referenced by dynamic::gc_tune().

virtual void dynamic::gc::garbage_collector::set_idle_gc_factor ( int   )  [pure virtual]

Sets when GC will next happen, if calling try_idle_gc().

The default = 20, which means that the heap grows by a factor of 2 before GC happens.

Referenced by dynamic::gc_tune().


The documentation for this class was generated from the following files:

Generated on Thu Dec 18 22:14:19 2008 for C++Script by  doxygen 1.5.7.1