summaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 4f8c41bc..72b1af05 100644
--- a/gc.c
+++ b/gc.c
@@ -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