From d6d7fe4976d4265dbfd6b1ad048339b8ff8f9120 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marco=20T=C3=BAlio=20Gontijo=20e=20Silva?= Date: Fri, 28 May 2010 11:56:12 +0000 Subject: [PATCH] rts/sm/GC.c: resize_generations(): Remove unneeded check of number of generations. This "if" is inside another "if" which checks for RtsFlags.GcFlags.generations > 1, so testing this again is redundant, assuming the number of generations won't change during program execution. --- rts/sm/GC.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 34aa0fd..ee3e170 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -1504,11 +1504,10 @@ resize_generations (void) // Auto-enable compaction when the residency reaches a // certain percentage of the maximum heap size (default: 30%). - if (RtsFlags.GcFlags.generations > 1 && - (RtsFlags.GcFlags.compact || - (max > 0 && - oldest_gen->n_blocks > - (RtsFlags.GcFlags.compactThreshold * max) / 100))) { + if (RtsFlags.GcFlags.compact || + (max > 0 && + oldest_gen->n_blocks > + (RtsFlags.GcFlags.compactThreshold * max) / 100)) { oldest_gen->mark = 1; oldest_gen->compact = 1; // debugBelch("compaction: on\n", live); -- 1.7.10.4