From: simonmar Date: Thu, 30 Aug 2001 10:22:52 +0000 (+0000) Subject: [project @ 2001-08-30 10:22:52 by simonmar] X-Git-Tag: Approximately_9120_patches~1044 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0e5aaaaa0183894e411c3e3b7506eeb762bed31e;p=ghc-hetmet.git [project @ 2001-08-30 10:22:52 by simonmar] Don't automatically enable compaction when generations == 1. --- diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 3d4e687..d978fce 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.121 2001/08/17 15:46:54 simonmar Exp $ + * $Id: GC.c,v 1.122 2001/08/30 10:22:52 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -741,10 +741,11 @@ GarbageCollect ( void (*get_roots)(evac_fn), rtsBool force_major_gc ) // Auto-enable compaction when the residency reaches a // certain percentage of the maximum heap size (default: 30%). - if (RtsFlags.GcFlags.compact || - (max > 0 && - oldest_gen->steps[0].n_blocks > - (RtsFlags.GcFlags.compactThreshold * max) / 100)) { + if (RtsFlags.GcFlags.generations > 1 && + (RtsFlags.GcFlags.compact || + (max > 0 && + oldest_gen->steps[0].n_blocks > + (RtsFlags.GcFlags.compactThreshold * max) / 100))) { oldest_gen->steps[0].is_compacted = 1; // fprintf(stderr,"compaction: on\n", live); } else {