diff options
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -72,6 +72,10 @@ static val heap_min_bound, heap_max_bound; int gc_enabled = 1; +#if EXTRA_DEBUGGING +static val break_obj; +#endif + val prot1(val *loc) { assert (top < prot_stack_limit); @@ -243,6 +247,11 @@ tail_call: obj->t.type = (type_t) (obj->t.type | REACHABLE); +#if EXTRA_DEBUGGING + if (obj == break_obj) + breakpt(); +#endif + switch (t) { case CONS: mark_obj(obj->c.car); @@ -512,6 +521,15 @@ void unmark(void) } } +void dheap(heap_t *heap, int start, int end); + +void dheap(heap_t *heap, int start, int end) +{ + int i; + for (i = start; i < end; i++) + format(std_output, lit("(~a ~s)\n"), num(i), &heap->block[i], nao); +} + /* * This function does nothing. * gc_hint(x) just takes the address of local variable x |