From ef80d410ca724fb9e36c25a4758af8ae60da01fd Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 26 Jun 2013 22:48:40 -0400 Subject: [PATCH] better memory stats --- toolbox/mm.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/toolbox/mm.cpp b/toolbox/mm.cpp index 5a2bf3e..27492ea 100644 --- a/toolbox/mm.cpp +++ b/toolbox/mm.cpp @@ -104,6 +104,16 @@ namespace MM void PrintMemoryStats() { mplite_print_stats(&pool, std::puts); + + for (const auto & kv : HandleMap) + { + const auto h = kv.first; + const auto & info = kv.second; + fprintf(stdout, "%08x %08x %08x %c %c\n", + h, info.address, info.size, + info.locked? 'L' : ' ', info.purgeable? 'P' : ' '); + } + }