From: Simon Marlow Date: Wed, 13 Jun 2007 11:15:52 +0000 (+0000) Subject: another fix for -hb: we appear to be freeing the hash table and arena twice X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=61af839f961ea85dc80bed03313ee318fc02fa00;hp=23e5985c3db852981d527d10d6a6271688049790 another fix for -hb: we appear to be freeing the hash table and arena twice --- diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index ed5dc36..f1a3b05 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -343,8 +343,12 @@ initEra(Census *census) STATIC_INLINE void freeEra(Census *census) { - arenaFree(census->arena); - freeHashTable(census->hash, NULL); + if (RtsFlags.ProfFlags.bioSelector != NULL) + // when bioSelector==NULL, these are freed in heapCensus() + { + arenaFree(census->arena); + freeHashTable(census->hash, NULL); + } } /* --------------------------------------------------------------------------