summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-06-13 11:15:52 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-06-13 11:15:52 +0000
commit61af839f961ea85dc80bed03313ee318fc02fa00 (patch)
tree008ba892c14a661040cd620a19e8a3811fa82546 /rts
parent23e5985c3db852981d527d10d6a6271688049790 (diff)
downloadhaskell-61af839f961ea85dc80bed03313ee318fc02fa00.tar.gz
another fix for -hb: we appear to be freeing the hash table and arena twice
Diffstat (limited to 'rts')
-rw-r--r--rts/ProfHeap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index ed5dc36009..f1a3b05ce4 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);
+ }
}
/* --------------------------------------------------------------------------