diff options
| author | robarnold <robarnold@cs.cmu.edu> | 2011-07-29 09:13:20 -0700 |
|---|---|---|
| committer | robarnold <robarnold@cs.cmu.edu> | 2011-07-29 09:13:20 -0700 |
| commit | bdf2daee1e6b1e9093b31c3ce1f94af73ef6b36b (patch) | |
| tree | c4c1a2898c40ec036d034da4482b875a98dfafa7 | |
| parent | 48cc11631ca358fe6cd3fec3daf1e9c1d132a810 (diff) | |
| parent | f45ac8db07d81ade3725ecd9b2cb7783051ad7df (diff) | |
| download | rust-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.cpp | 6 |
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); } } } |
