[commit: ghc] master: fix a shutdown memory leak (cfe22ec)
Simon Marlow
marlowsd at gmail.com
Fri Apr 15 12:45:37 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/cfe22ecbdac3b2340787110e0093239956f17c3d
>---------------------------------------------------------------
commit cfe22ecbdac3b2340787110e0093239956f17c3d
Author: Simon Marlow <marlowsd at gmail.com>
Date: Thu Apr 14 16:38:00 2011 +0100
fix a shutdown memory leak
>---------------------------------------------------------------
rts/Stats.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/rts/Stats.c b/rts/Stats.c
index 3e7b5d8..fa38472 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -753,12 +753,18 @@ stat_exit(int alloc)
statsClose();
}
- if (GC_coll_cpu)
+ if (GC_coll_cpu) {
stgFree(GC_coll_cpu);
- GC_coll_cpu = NULL;
- if (GC_coll_elapsed)
+ GC_coll_cpu = NULL;
+ }
+ if (GC_coll_elapsed) {
stgFree(GC_coll_elapsed);
- GC_coll_elapsed = NULL;
+ GC_coll_elapsed = NULL;
+ }
+ if (GC_coll_max_pause) {
+ stgFree(GC_coll_max_pause);
+ GC_coll_max_pause = NULL;
+ }
}
/* -----------------------------------------------------------------------------
More information about the Cvs-ghc
mailing list