Control.Exception.unblock wasn't unblocking exceptions
[ghc-hetmet.git] / rts / Storage.c
index 46db1ee..3594f71 100644 (file)
@@ -127,7 +127,7 @@ initStorage( void )
       RtsFlags.GcFlags.minAllocAreaSize > 
       RtsFlags.GcFlags.maxHeapSize) {
       errorBelch("maximum heap size (-M) is smaller than minimum alloc area size (-A)");
-      exit(1);
+      RtsFlags.GcFlags.minAllocAreaSize = RtsFlags.GcFlags.maxHeapSize;
   }
 
   initBlockAllocator();
@@ -273,6 +273,11 @@ exitStorage (void)
 void
 freeStorage (void)
 {
+    nat g;
+
+    for(g = 0; g < RtsFlags.GcFlags.generations; g++)
+      stgFree(generations[g].steps);
+    stgFree(generations);
     freeAllMBlocks();
 }