From b6be83885f26c02888b17cdca78edb8d125e36cb Mon Sep 17 00:00:00 2001 From: Rob Arnold Date: Wed, 3 Aug 2011 20:33:22 -0700 Subject: Log tags in memory_region::{free,realloc} Make this useful and consistent with the destructor. --- src/rt/memory_region.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rt/memory_region.cpp') diff --git a/src/rt/memory_region.cpp b/src/rt/memory_region.cpp index a862dc4b7b5..1d49fb6114e 100644 --- a/src/rt/memory_region.cpp +++ b/src/rt/memory_region.cpp @@ -42,8 +42,8 @@ void memory_region::free(void *mem) { assert(alloc->magic == MAGIC); #ifdef TRACK_ALLOCATIONS if (_allocation_list[alloc->index] != alloc) { - printf("free: ptr 0x%" PRIxPTR " is not in allocation_list\n", - (uintptr_t) mem); + printf("free: ptr 0x%" PRIxPTR " (%s) is not in allocation_list\n", + (uintptr_t) &alloc->data, alloc->tag); _srv->fatal("not in allocation_list", __FILE__, __LINE__, ""); } else { @@ -73,8 +73,8 @@ memory_region::realloc(void *mem, size_t size) { if (_allocation_list[newMem->index] != alloc) { printf("at index %d, found %p, expected %p\n", alloc->index, _allocation_list[alloc->index], alloc); - printf("realloc: ptr 0x%" PRIxPTR " is not in allocation_list\n", - (uintptr_t) mem); + printf("realloc: ptr 0x%" PRIxPTR " (%s) is not in allocation_list\n", + (uintptr_t) &alloc->data, alloc->tag); _srv->fatal("not in allocation_list", __FILE__, __LINE__, ""); } else { -- cgit 1.4.1-3-g733a5