X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FGC.c;h=0d2ba85860fd36a996af6e69dceff1a820c8e84f;hb=06f9b7c365fb9e9b53723f892b4d63b4f7a56e9a;hp=fe26cf9e531849f0acf54d9dbd46f7dd8429a0a7;hpb=15b6daa6d8e35e34ad077049c1f76d9f5966be9a;p=ghc-hetmet.git diff --git a/rts/sm/GC.c b/rts/sm/GC.c index fe26cf9..0d2ba85 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -214,11 +214,6 @@ GarbageCollect ( rtsBool force_major_gc ) stmPreGCHook(); #ifdef DEBUG - // check for memory leaks if DEBUG is on - memInventory(); -#endif - -#ifdef DEBUG mutlist_MUTVARS = 0; mutlist_MUTARRS = 0; mutlist_OTHERS = 0; @@ -266,6 +261,11 @@ GarbageCollect ( rtsBool force_major_gc ) } #endif +#ifdef DEBUG + // check for memory leaks if DEBUG is on + memInventory(traceClass(DEBUG_gc)); +#endif + // check stack sanity *before* GC (ToDo: check all threads) IF_DEBUG(sanity, checkFreeListSanity()); @@ -667,7 +667,7 @@ GarbageCollect ( rtsBool force_major_gc ) #ifdef DEBUG // check for memory leaks if DEBUG is on - memInventory(); + memInventory(traceClass(DEBUG_gc)); #endif #ifdef RTS_GTK_FRONTPANEL