[project @ 2001-08-10 10:57:23 by simonmar]
authorsimonmar <unknown>
Fri, 10 Aug 2001 10:57:23 +0000 (10:57 +0000)
committersimonmar <unknown>
Fri, 10 Aug 2001 10:57:23 +0000 (10:57 +0000)
Fix another place where the maxHeapSize is set to the
heapSizeSuggestion, now that maxHeapSize == 0 indicates "unbounded".

ghc/compiler/parser/hschooks.c

index 82dd838..7d94a7a 100644 (file)
@@ -42,8 +42,8 @@ setHeapSize( HsInt size )
 {
 #if __GLASGOW_HASKELL__ >= 408
     RtsFlags.GcFlags.heapSizeSuggestion = size / BLOCK_SIZE;
-    if (RtsFlags.GcFlags.heapSizeSuggestion > 
-       RtsFlags.GcFlags.maxHeapSize) {
+    if (RtsFlags.GcFlags.maxHeapSize != 0 &&
+       RtsFlags.GcFlags.heapSizeSuggestion > RtsFlags.GcFlags.maxHeapSize) {
        RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion;
     }
 #endif