Skip to content

Commit bdf2dae

Browse files
committed
Merge pull request #781 from robarnold/upstream-stable
More useful leak debugging output.
2 parents 48cc116 + f45ac8d commit bdf2dae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/rt/memory_region.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ memory_region::~memory_region() {
130130
if (_detailed_leaks) {
131131
for (size_t i = 0; i < _allocation_list.size(); i++) {
132132
if (_allocation_list[i] != NULL) {
133-
printf("allocation 0x%" PRIxPTR " was not freed\n",
134-
(uintptr_t) _allocation_list[i]);
133+
alloc_header *header = (alloc_header*)_allocation_list[i];
134+
printf("allocation (%s) 0x%" PRIxPTR " was not freed\n",
135+
header->tag,
136+
(uintptr_t) &header->data);
135137
}
136138
}
137139
}

0 commit comments

Comments
 (0)