diff options
author | Simon Marlow <simonmar@microsoft.com> | 2006-08-08 10:31:10 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2006-08-08 10:31:10 +0000 |
commit | 9f2ceb4da7dfbc1cfd09ce54610ebe64288b9007 (patch) | |
tree | c8a72bc8d7e4663c9b5f789d54a6a69bfbba4340 /rts/Stable.c | |
parent | 3098d2143a5865f8f1fba1d7d72132b140f2de94 (diff) | |
download | haskell-9f2ceb4da7dfbc1cfd09ce54610ebe64288b9007.tar.gz |
Remember to free() memory on exit
Patch mostly from Lennart Augustsson in #803, with additions to
Task.c by me.
Diffstat (limited to 'rts/Stable.c')
-rw-r--r-- | rts/Stable.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rts/Stable.c b/rts/Stable.c index 2391cb127f..5a1b92b321 100644 --- a/rts/Stable.c +++ b/rts/Stable.c @@ -159,6 +159,18 @@ initStablePtrTable(void) #endif } +void +exitStablePtrTable(void) +{ + if (addrToStableHash) + freeHashTable(addrToStableHash, NULL); + addrToStableHash = NULL; + if (stable_ptr_table) + stgFree(stable_ptr_table); + stable_ptr_table = NULL; + SPT_size = 0; +} + /* * get at the real stuff...remove indirections. * |