Back to index

plt-scheme  4.2.1
Defines | Functions
immobile_boxes.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define traverse_immobiles(gcMUCK, set_bt_src)

Functions

void ** GC_malloc_immobile_box (void *p)
void GC_free_immobile_box (void **b)
static void mark_immobiles (GCTYPE *gc)
static void repair_immobiles (GCTYPE *gc)

Define Documentation

#define traverse_immobiles (   gcMUCK,
  set_bt_src 
)
Value:
{                      \
    GC_Immobile_Box *ib;                                \
    for(ib = gc->immobile_boxes; ib; ib = ib->next) {          \
      set_bt_src(ib, BT_IMMOBILE);                                         \
      gcMUCK(ib->p);                                    \
    }                                                   \
  }

Definition at line 33 of file immobile_boxes.c.


Function Documentation

Definition at line 17 of file immobile_boxes.c.

{
  GCTYPE *gc = GC_get_GC();
  GC_Immobile_Box *ib;

  for(ib = gc->immobile_boxes; ib; ib = ib->next)
    if(PPTR(ib) == b) {
      if(ib->prev) ib->prev->next = ib->next;
      if(!ib->prev) gc->immobile_boxes = ib->next;
      if(ib->next) ib->next->prev = ib->prev;
      free(ib);
      return;
    }
  GCWARN((GCOUTF, "Attempted free of non-existent immobile box %p\n", b));
}

Definition at line 4 of file immobile_boxes.c.

{
  GCTYPE *gc = GC_get_GC();
  GC_Immobile_Box *ib = ofm_malloc(sizeof(GC_Immobile_Box));
  if(!ib) GCERR((GCOUTF, "Couldn't allocate space for immobile box!\n"));
  ib->p     = p; 
  ib->next  = gc->immobile_boxes;
  ib->prev  = NULL;
  if(ib->next) ib->next->prev = ib;
  gc->immobile_boxes = ib;
  return (void**)ib;
}
static void mark_immobiles ( GCTYPE gc) [inline, static]

Definition at line 41 of file immobile_boxes.c.

Here is the caller graph for this function:

static void repair_immobiles ( GCTYPE gc) [inline, static]

Definition at line 46 of file immobile_boxes.c.

Here is the caller graph for this function: