From c9477f2a34961d1f1fd1b72f5cc6fa4618f70794 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 30 Aug 2001 10:21:40 +0000 Subject: [PATCH] [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. --- ghc/rts/Storage.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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]; -- 1.7.10.4