aboutsummaryrefslogtreecommitdiffstats
path: root/test/harness/maingc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/harness/maingc.c')
-rw-r--r--test/harness/maingc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/harness/maingc.c b/test/harness/maingc.c
index 4d5942f6..c7a2e8e1 100644
--- a/test/harness/maingc.c
+++ b/test/harness/maingc.c
@@ -19,9 +19,19 @@ extern void * alloc_block(struct rootblock * roots,
enum block_kind kind,
int size);
+#ifdef DEBUG
+extern void check_heap(void);
+#endif
+
void gc_alarm(int live)
{
- printf("<GC...%d bytes live>\n", live);
+ if (live == -1)
+ printf("<GC...>\n");
+ else
+ printf("<GC...%d bytes live>\n", live);
+#ifdef DEBUG
+ check_heap();
+#endif
}
/* Test with binary trees */