From: simonmar Date: Thu, 30 Aug 2001 10:21:40 +0000 (+0000) Subject: [project @ 2001-08-30 10:21:40 by simonmar] X-Git-Tag: Approximately_9120_patches~1045 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c9477f2a34961d1f1fd1b72f5cc6fa4618f70794;p=ghc-hetmet.git [project @ 2001-08-30 10:21:40 by simonmar] Automatically disable compaction when there's only one generation (-G1) and print a warning to that effect. --- diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index a2c111b..8cba094 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.c,v 1.49 2001/08/14 13:40:09 sewardj Exp $ + * $Id: Storage.c,v 1.50 2001/08/30 10:21:40 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -168,7 +168,11 @@ initStorage( void ) /* The oldest generation has one step and it is compacted. */ if (RtsFlags.GcFlags.compact) { - oldest_gen->steps[0].is_compacted = 1; + if (RtsFlags.GcFlags.generations == 1) { + belch("WARNING: compaction is incompatible with -G1; disabled"); + } else { + oldest_gen->steps[0].is_compacted = 1; + } } oldest_gen->steps[0].to = &oldest_gen->steps[0];