diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-05-08 10:09:08 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-05-08 10:09:08 +0000 |
commit | 7f6c03992744898286d41529200508f775a77e04 (patch) | |
tree | da29093f977847416ea356b41fd7aded961cc834 /rts/ProfHeap.c | |
parent | a7f3dd00fd6fd4111ddaef0f5b5ab88cf6a05694 (diff) | |
download | haskell-7f6c03992744898286d41529200508f775a77e04.tar.gz |
FIX crash on exit with biographical profiling
Seems to be a bug introduced by code to free the memory allocated by
the heap profiler.
Diffstat (limited to 'rts/ProfHeap.c')
-rw-r--r-- | rts/ProfHeap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index 76a6b33edc..19abac77a8 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -523,11 +523,13 @@ endHeapProfiling(void) } #endif - { + if (doingLDVProfiling()) { nat t; - for (t = 0; t <= era; t++) { + for (t = 1; t <= era; t++) { freeEra( &censuses[t] ); } + } else { + freeEra( &censuses[0] ); } stgFree(censuses); |