aboutsummaryrefslogtreecommitdiffstats
path: root/test/harness/maingc.c
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-10-27 12:16:54 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-10-27 12:16:54 +0000
commit7a3338431e5f09a90bfda16350202f5c7780d110 (patch)
treebe0e175c0ba21b3401cc227854efe7e60fc0b558 /test/harness/maingc.c
parentca285074159abb65a815db5c08284becaa297df0 (diff)
downloadcompcert-7a3338431e5f09a90bfda16350202f5c7780d110.tar.gz
compcert-7a3338431e5f09a90bfda16350202f5c7780d110.zip
Ajout test mark&sweep GC
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@134 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
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 */