From 376fad712985bb936489b97c52386d8c6c885e38 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 12 Nov 2008 11:21:44 +0000 Subject: [PATCH] Only allocate a mark stack if we're actually doing marking saves a bit of memory in major GCs --- rts/sm/GC.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 5cd1298..aff3320 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -289,7 +289,7 @@ GarbageCollect ( rtsBool force_major_gc ) /* Allocate a mark stack if we're doing a major collection. */ - if (major_gc) { + if (major_gc && oldest_gen->steps[0].mark) { nat mark_stack_blocks; mark_stack_blocks = stg_max(MARK_STACK_BLOCKS, oldest_gen->steps[0].n_old_blocks / 100); -- 1.7.10.4