flx_gc_private.hpp

00001 #line 389 "./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 slots max
00015   unsigned long n_used;    // how many slots used
00016   frame_t *next;          // the next and previous objects
00017   frame_t *prev;          // in the collectors list
00018   collector_t *collector; // the managing collector
00019   bool garbage;           // the garbage flag
00020   bool finalised;         // whether the object is finalised
00021 };
00022 
00023 }}} // end namespaces
00024 
00025 // ----------------------------------------------------
00026 
00027 #define _ROUNDUP(i,n) ((i + n - 1) / n * n)
00028 #define _ALIGN(i) _ROUNDUP(i,FLX_MAX_ALIGN)
00029 
00030 #define FRAMESIZE int(_ALIGN(sizeof(flx::gc::generic::frame_t)))
00031 #define FRAME_TO_CLIENT(p) \
00032   ((void*)((unsigned char*)(void*)p + FRAMESIZE))
00033 #define CLIENT_TO_FRAME(p) \
00034   ((frame_t*)(void*)((unsigned char*)p - FRAMESIZE))
00035 
00036 

Generated on Thu May 29 14:24:58 2008 for Felix by  doxygen 1.5.5