From 7a3338431e5f09a90bfda16350202f5c7780d110 Mon Sep 17 00:00:00 2001 From: xleroy Date: Fri, 27 Oct 2006 12:16:54 +0000 Subject: Ajout test mark&sweep GC git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@134 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- test/harness/maingc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test/harness/maingc.c') 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("\n", live); + if (live == -1) + printf("\n"); + else + printf("\n", live); +#ifdef DEBUG + check_heap(); +#endif } /* Test with binary trees */ -- cgit