X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=rts%2Fsm%2FStorage.c;h=10a0a38d957272f1725c660676fb3e88707493f1;hb=cc94b30f3d854ed97ac6a7a54fa12247295219d4;hp=2e43bffdfc5ab6b39325664d99ca8e8acf1a3718;hpb=cebecc110be6e53c310326940a311cab7fad84ca;p=ghc-hetmet.git diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 2e43bff..10a0a38 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -213,10 +213,10 @@ exitStorage (void) } void -freeStorage (void) +freeStorage (rtsBool free_heap) { stgFree(generations); - freeAllMBlocks(); + if (free_heap) freeAllMBlocks(); #if defined(THREADED_RTS) closeMutex(&sm_mutex); #endif @@ -331,7 +331,7 @@ newDynCAF (StgRegTable *reg STG_UNUSED, StgClosure *caf) static bdescr * allocNursery (bdescr *tail, nat blocks) { - bdescr *bd; + bdescr *bd = NULL; nat i, n; // We allocate the nursery as a single contiguous block and then