flx_gc_private.hpp

00001 #line 447 "./lpsrc/flx_gc.pak"
00002 // THIS IS A HACK .. required by generic pointer
00003 // manipulators -- but really should be private to the Felix
00004 // default collector implementation
00005 
00006 namespace flx {
00007 namespace gc {
00008 namespace generic { // SHOULD BE NAMESPACE collector
00009 
00010 /// Heap Frame header
00011 struct frame_t
00012 {
00013   gc_shape_t *shape;      // the shape of each object
00014   unsigned long n_objects; // how many objects (for arrays)
00015   frame_t *next;          // the next and previous objects
00016   frame_t *prev;          // in the collectors list
00017   collector_t *collector; // the managing collector
00018   bool garbage;           // the garbage flag
00019   bool finalised;         // whether the object is finalised
00020 };
00021 
00022 }}} // end namespaces
00023 
00024 // ----------------------------------------------------
00025 
00026 #define _ROUNDUP(i,n) ((i + n - 1) / n * n)
00027 #define _ALIGN(i) _ROUNDUP(i,FLX_MAX_ALIGN)
00028 
00029 #define FRAMESIZE int(_ALIGN(sizeof(flx::gc::generic::frame_t)))
00030 #define FRAME_TO_CLIENT(p) \
00031   ((void*)((unsigned char*)(void*)p + FRAMESIZE))
00032 #define CLIENT_TO_FRAME(p) \
00033   ((frame_t*)(void*)((unsigned char*)p - FRAMESIZE))
00034 
00035 

Generated on Mon Dec 11 14:48:23 2006 for Felix by  doxygen 1.5.1