Commit d6d7fe49 authored by Marco Túlio Gontijo e Silva's avatar Marco Túlio Gontijo e Silva
Browse files

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.
parent 1b12fd49
...@@ -1504,11 +1504,10 @@ resize_generations (void) ...@@ -1504,11 +1504,10 @@ resize_generations (void)
// Auto-enable compaction when the residency reaches a // Auto-enable compaction when the residency reaches a
// certain percentage of the maximum heap size (default: 30%). // certain percentage of the maximum heap size (default: 30%).
if (RtsFlags.GcFlags.generations > 1 && if (RtsFlags.GcFlags.compact ||
(RtsFlags.GcFlags.compact || (max > 0 &&
(max > 0 && oldest_gen->n_blocks >
oldest_gen->n_blocks > (RtsFlags.GcFlags.compactThreshold * max) / 100)) {
(RtsFlags.GcFlags.compactThreshold * max) / 100))) {
oldest_gen->mark = 1; oldest_gen->mark = 1;
oldest_gen->compact = 1; oldest_gen->compact = 1;
// debugBelch("compaction: on\n", live); // debugBelch("compaction: on\n", live);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment