Collectable Class Reference

#include <collectable.h>

+ Inheritance diagram for Collectable:

Public Member Functions

ScripterExport Collectable ()
 
virtual ScripterExport ~Collectable ()
 
ScripterExport voidoperator new (size_t sz, char flag)
 
ScripterExport voidoperator new (size_t sz)
 
ScripterExport void operator delete (void *val)
 
ScripterExport void operator delete (void *val, char flag)
 
virtual void collect ()=0
 
virtual ScripterExport void gc_trace ()
 
ScripterExport bool derives_from_Animatable ()
 
virtual BOOL derives_from_MAXWrapper ()
 
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 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 ()
 
static ScripterExport bool validate_value_linkages ()
 

Public Attributes

Collectablenext
 
Collectableprev
 
byte flags
 
byte flags2
 
short flags3
 

Static Public Attributes

static CRITICAL_SECTION heap_update
 
static Collectablecollectable_list
 
static Collectablepermanent_list
 
static free_memfree_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
 

Friends

class Value
 

Constructor & Destructor Documentation

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
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 
)
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
static void close_down ( )
static
static void drop_maxwrapper_refs ( )
static
ScripterExport bool derives_from_Animatable ( )
virtual BOOL derives_from_MAXWrapper ( )
inlinevirtual

Reimplemented in MAXWrapper.

163 { return FALSE; }
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
172 { return (flags & GC_IN_USE); }
byte flags
Definition: collectable.h:117
Definition: collectable.h:35
int is_not_marked ( )
inline
174  {
175  DbgAssert (!is_on_stack()); // debugging new stack-based collector
176  return !is_marked();
177  }
int is_on_stack()
Definition: collectable.h:184
#define DbgAssert(expr)
Definition: assert1.h:72
int is_marked()
Definition: collectable.h:172
int is_garbage ( )
inline
178 { return is_not_marked(); }
int is_not_marked()
Definition: collectable.h:173
int is_permanent ( )
inline
179 { return (flags & GC_PERMANENT); }
byte flags
Definition: collectable.h:117
Definition: collectable.h:37
void mark_in_use ( )
inline
180 { flags |= GC_IN_USE; }
byte flags
Definition: collectable.h:117
Definition: collectable.h:35
void unmark_in_use ( )
inline
181 { flags &= ~GC_IN_USE; }
byte flags
Definition: collectable.h:117
Definition: collectable.h:35
int has_heap_copy ( )
inline
182 { return (flags & (GC_IN_HEAP | GC_MIGRATED_TO_HEAP | GC_STATIC)); }
Definition: collectable.h:42
Definition: collectable.h:40
byte flags
Definition: collectable.h:117
Definition: collectable.h:38
int is_in_heap ( )
inline
183 { return (flags & GC_IN_HEAP); }
byte flags
Definition: collectable.h:117
Definition: collectable.h:38
int is_on_stack ( )
inline
184 { return (flags & GC_ON_STACK); }
Definition: collectable.h:41
byte flags
Definition: collectable.h:117
static ScripterExport ULONGLONG get_num_values_created ( )
static
static ScripterExport bool validate_value_linkages ( )
static

Friends And Related Function Documentation

friend class Value
friend

Member Data Documentation

Collectable* next
Collectable* prev
CRITICAL_SECTION heap_update
static
byte flags
byte flags2
short flags3
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 bool fullCollectNextHoldFlush
static
bool gc_light
static
bool in_gc
static
HANDLE hGCCompletedEvent
static