Back to index

plt-scheme  4.2.1
commongc_internal.h
Go to the documentation of this file.
00001 typedef short Type_Tag;
00002 
00003 typedef struct Roots {
00004   long count;
00005   long size;
00006   /* roots is a array of longs, logically grouped into start and end pairs.
00007    * [ start0, end0, start1, end1, ... ]
00008    */ 
00009   unsigned long *roots;
00010   int nothing_new;
00011 } Roots;
00012 
00013 /* The GC_Weak_Array structure is not externally visible, but
00014    clients expect a specific structure. See README for more
00015    information. */
00016 typedef struct GC_Weak_Array {
00017   Type_Tag type;
00018   short keyex;
00019   long count;
00020   void *replace_val;
00021   struct GC_Weak_Array *next;
00022   void *data[1]; /* must be the 5th longword! */
00023 } GC_Weak_Array;
00024 
00025 /* The GC_Weak_Box struct is not externally visible, but
00026    first three fields are mandated by the GC interface */
00027 typedef struct GC_Weak_Box {
00028   Type_Tag type;
00029   short keyex;
00030   void *val;
00031   /* The rest is up to us: */
00032   void **secondary_erase;
00033   int soffset;
00034   struct GC_Weak_Box *next;
00035 } GC_Weak_Box;
00036 
00037 /* The GC_Ephemeron struct is not externally visible, but
00038    first three fields are mandated by the GC interface */
00039 typedef struct GC_Ephemeron {
00040   Type_Tag type;
00041   short keyex;
00042   void *key;
00043   void *val;
00044   /* The rest is up to us: */
00045   struct GC_Ephemeron *next;
00046 } GC_Ephemeron;
00047 
00048 typedef struct GC_Immobile_Box {
00049   void *p; /* this must be first or mred dies */
00050   struct GC_Immobile_Box *next;
00051   struct GC_Immobile_Box *prev;
00052 } GC_Immobile_Box;
00053 
00054 typedef struct finalizer {
00055   char eager_level;
00056   char tagged;
00057   void *p;
00058   GC_finalization_proc f;
00059   void *data;
00060 #if CHECKS
00061   long size;
00062 #endif
00063   struct finalizer *next;
00064   /* Patched after GC: */
00065   struct finalizer *prev;
00066   struct finalizer *left;
00067   struct finalizer *right;
00068 } Fnl;