about summary refs log tree commit diff
diff options
context:
space:
mode:
authorrobarnold <robarnold@cs.cmu.edu>2011-07-29 09:13:20 -0700
committerrobarnold <robarnold@cs.cmu.edu>2011-07-29 09:13:20 -0700
commitbdf2daee1e6b1e9093b31c3ce1f94af73ef6b36b (patch)
treec4c1a2898c40ec036d034da4482b875a98dfafa7
parent48cc11631ca358fe6cd3fec3daf1e9c1d132a810 (diff)
parentf45ac8db07d81ade3725ecd9b2cb7783051ad7df (diff)
downloadrust-bdf2daee1e6b1e9093b31c3ce1f94af73ef6b36b.tar.gz
rust-bdf2daee1e6b1e9093b31c3ce1f94af73ef6b36b.zip
Merge pull request #781 from robarnold/upstream-stable
More useful leak debugging output.
-rw-r--r--src/rt/memory_region.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rt/memory_region.cpp b/src/rt/memory_region.cpp
index b142534a242..a862dc4b7b5 100644
--- a/src/rt/memory_region.cpp
+++ b/src/rt/memory_region.cpp
@@ -130,8 +130,10 @@ memory_region::~memory_region() {
     if (_detailed_leaks) {
         for (size_t i = 0; i < _allocation_list.size(); i++) {
             if (_allocation_list[i] != NULL) {
-                printf("allocation 0x%" PRIxPTR " was not freed\n",
-                       (uintptr_t) _allocation_list[i]);
+                alloc_header *header = (alloc_header*)_allocation_list[i];
+                printf("allocation (%s) 0x%" PRIxPTR " was not freed\n",
+                       header->tag,
+                       (uintptr_t) &header->data);
             }
         }
     }