Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

Collectable Class Reference

Search for all occurrences

#include <collectable.h>

Inheritance diagram for Collectable:
Inheritance graph
[legend]

List of all members.

Public Member Functions

ScripterExport  Collectable ()
virtual ScripterExport  ~Collectable ()
ScripterExport void *  operator new (size_t sz, char flag)
ScripterExport void *  operator new (size_t sz)
ScripterExport void  operator delete (void *val)
ScripterExport void  operator delete (void *val, char flag)
virtual void  collect ()=0
virtual void  gc_trace ()
ScripterExport void  make_collectable ()
void  make_permanent ()
void  make_static ()
int  is_marked ()
int  is_not_marked ()
int  is_garbage ()
int  is_permanent ()
void  mark_in_use ()
void  unmark_in_use ()
int  has_heap_copy ()
int  is_in_heap ()
int  is_on_stack ()

Static Public Member Functions

static ScripterExport void  for_all_values (void(*map_fn)(Value *val), ValueMapper *mapper=NULL, ValueMetaClass *c=NULL)
static ScripterExport void *  heap_alloc (size_t sz)
static ScripterExport void *  stack_alloc (size_t sz)
static ScripterExport void  heap_free (void *p)
static void  mark ()
static void  sweep ()
static void  setup (size_t)
static ScripterExport void  gc ()
static void  coalesce_free_list ()
static void  close_down ()
static void  drop_maxwrapper_refs ()
static ScripterExport void  push_alloc_stack_frame ()
static ScripterExport void  pop_alloc_stack_frame ()
static ScripterExport ULONGLONG  get_num_values_created ()

Public Attributes

Collectable next
Collectable prev
byte  flags
byte  flags2
short  flags3

Static Public Attributes

static CRITICAL_SECTION  heap_update
static Collectable collectable_list
static Collectable permanent_list
static free_mem free_list [GC_NUM_SUBLISTS]
static size_t  heap_allocated
static size_t  heap_size
static ScripterExport
collectable_state 
state
static ScripterExport bool  fullCollectNextHoldFlush
static bool  gc_light
static bool  in_gc
static HANDLE  hGCCompletedEvent

Constructor & Destructor Documentation

ScripterExport Collectable ( )
virtual ScripterExport ~Collectable ( ) [virtual]

Member Function Documentation

static ScripterExport void for_all_values ( void(*)(Value *val)  map_fn,
ValueMapper mapper = NULL,
ValueMetaClass c = NULL 
) [static]
static ScripterExport void* heap_alloc ( size_t  sz ) [static]
static ScripterExport void* stack_alloc ( size_t  sz ) [static]
static ScripterExport void heap_free ( void *  p ) [static]
ScripterExport void* operator new ( size_t  sz,
char  flag 
)
ScripterExport void* operator new ( size_t  sz ) [inline]
{ return heap_alloc(sz); }
ScripterExport void operator delete ( void *  val )
ScripterExport void operator delete ( void *  val,
char  flag 
) [inline]
static void mark ( ) [static]
static void sweep ( ) [static]
static void setup ( size_t  ) [static]
static ScripterExport void gc ( ) [static]
static void coalesce_free_list ( ) [static]
virtual void collect ( ) [pure virtual]
virtual void gc_trace ( ) [inline, virtual]
static void close_down ( ) [static]
static void drop_maxwrapper_refs ( ) [static]
ScripterExport void make_collectable ( )
void make_permanent ( )
void make_static ( )
static ScripterExport void push_alloc_stack_frame ( ) [static]
static ScripterExport void pop_alloc_stack_frame ( ) [static]
int is_marked ( ) [inline]
{ return (flags & GC_IN_USE); }
int is_not_marked ( ) [inline]
    { 
        DbgAssert (!is_on_stack());   // debugging new stack-based collector
        return !is_marked(); 
    }
int is_garbage ( ) [inline]
int is_permanent ( ) [inline]
{ return (flags & GC_PERMANENT); }
void mark_in_use ( ) [inline]
{ flags |= GC_IN_USE; }
void unmark_in_use ( ) [inline]
{ flags &= ~GC_IN_USE; }
int has_heap_copy ( ) [inline]
{ return (flags & (GC_IN_HEAP | GC_MIGRATED_TO_HEAP | GC_STATIC)); }
int is_in_heap ( ) [inline]
{ return (flags & GC_IN_HEAP); }
int is_on_stack ( ) [inline]
{ return (flags & GC_ON_STACK); }
static ScripterExport ULONGLONG get_num_values_created ( ) [static]

Member Data Documentation

CRITICAL_SECTION heap_update [static]
byte flags
byte flags2
short flags3
free_mem* free_list[GC_NUM_SUBLISTS] [static]
size_t heap_allocated [static]
size_t heap_size [static]
ScripterExport collectable_state state [static]
ScripterExport bool fullCollectNextHoldFlush [static]
bool gc_light [static]
bool in_gc [static]
HANDLE hGCCompletedEvent [static]

Collectable Collectable Collectable Collectable Collectable Collectable Collectable Collectable Collectable Collectable
Collectable Collectable Collectable Collectable Collectable Collectable Collectable Collectable Collectable Collectable