Cleanup after the OPTIONS parsing was moved.
[ghc-hetmet.git] / ghc / rts / Storage.c
index ef58c1f..5e00a57 100644 (file)
@@ -132,6 +132,7 @@ initStorage( void )
   
 #if defined(THREADED_RTS)
   initMutex(&sm_mutex);
+  initMutex(&atomic_modify_mutvar_mutex);
 #endif
 
   ACQUIRE_SM_LOCK;
@@ -265,6 +266,7 @@ void
 exitStorage (void)
 {
     stat_exit(calcAllocated());
+    freeAllMBlocks();
 }
 
 /* -----------------------------------------------------------------------------