summaryrefslogtreecommitdiff
path: root/rts/sm/GC.c
diff options
context:
space:
mode:
authorMarco TĂșlio Gontijo e Silva <marcot@debian.org>2010-05-28 11:56:12 +0000
committerMarco TĂșlio Gontijo e Silva <marcot@debian.org>2010-05-28 11:56:12 +0000
commitd6d7fe4976d4265dbfd6b1ad048339b8ff8f9120 (patch)
treef5875d69cde751adecdbbd5b3ff5de1545765ae5 /rts/sm/GC.c
parent1b12fd49b3c7adf69e9c0bcc6fc8b5c5204598b2 (diff)
downloadhaskell-d6d7fe4976d4265dbfd6b1ad048339b8ff8f9120.tar.gz
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.
Diffstat (limited to 'rts/sm/GC.c')
-rw-r--r--rts/sm/GC.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 34aa0fde41..ee3e17089a 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);