+ if (live_blocks + free_blocks != mblocks_allocated * BLOCKS_PER_MBLOCK)
+ {
+ debugBelch("Memory leak detected\n");
+ for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
+ debugBelch(" gen %d blocks : %4lu\n", g, gen_blocks[g]);
+ }
+ debugBelch(" nursery : %4lu\n", nursery_blocks);
+ debugBelch(" allocate() : %4lu\n", allocate_blocks);
+ debugBelch(" retainer : %4lu\n", retainer_blocks);
+ debugBelch(" arena blocks : %4lu\n", arena_blocks);
+ debugBelch(" exec : %4lu\n", exec_blocks);
+ debugBelch(" free : %4lu\n", free_blocks);
+ debugBelch(" total : %4lu\n\n", live_blocks + free_blocks);
+ debugBelch(" in system : %4lu\n", mblocks_allocated * BLOCKS_PER_MBLOCK);
+ ASSERT(0);
+ }