From: simonmar Date: Mon, 1 Oct 2001 11:09:02 +0000 (+0000) Subject: [project @ 2001-10-01 11:09:02 by simonmar] X-Git-Tag: Approximately_9120_patches~891 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1b9f74f630130480a4f260f506015af846ef726d;p=ghc-hetmet.git [project @ 2001-10-01 11:09:02 by simonmar] Actually bomb out with an error message if the maximum heap size is smaller than the minimum allocation area size. --- diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index 8cba094..134106d 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.c,v 1.50 2001/08/30 10:21:40 simonmar Exp $ + * $Id: Storage.c,v 1.51 2001/10/01 11:09:02 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -89,6 +89,13 @@ initStorage( void ) RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion; } + if (RtsFlags.GcFlags.maxHeapSize != 0 && + RtsFlags.GcFlags.minAllocAreaSize > + RtsFlags.GcFlags.maxHeapSize) { + prog_belch("maximum heap size (-M) is smaller than minimum alloc area size (-A)"); + exit(1); + } + initBlockAllocator(); /* allocate generation info array */