diff options
author | Miles Bader <miles@lsi.nec.co.jp> | 2002-11-21 06:06:22 +0000 |
---|---|---|
committer | Miles Bader <miles@lsi.nec.co.jp> | 2002-11-21 06:06:22 +0000 |
commit | 4d952dfe7756644a4e7f92081906fd7d4194209c (patch) | |
tree | 3ae59605aa27796cd2f1bc7d9bb852d3cb588a83 /libc/stdlib/malloc/realloc.c | |
parent | ac6d271cf95d6994c88ff8dcc096b98f33c50644 (diff) |
Improve malloc debugging support.
Diffstat (limited to 'libc/stdlib/malloc/realloc.c')
-rw-r--r-- | libc/stdlib/malloc/realloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libc/stdlib/malloc/realloc.c b/libc/stdlib/malloc/realloc.c index 9bfe95198..d4e0d9cb4 100644 --- a/libc/stdlib/malloc/realloc.c +++ b/libc/stdlib/malloc/realloc.c @@ -43,7 +43,7 @@ realloc (void *mem, size_t new_size) allocation unit (SIZE is already guaranteed to be so).*/ new_size = HEAP_ADJUST_SIZE (new_size + MALLOC_HEADER_SIZE); - MALLOC_DEBUG ("realloc: 0x%lx, %d (base = 0x%lx, total_size = %d)\n", + MALLOC_DEBUG (1, "realloc: 0x%lx, %d (base = 0x%lx, total_size = %d)", (long)mem, new_size, (long)base_mem, size); if (new_size > size) @@ -81,9 +81,10 @@ realloc (void *mem, size_t new_size) } if (mem) - MALLOC_DEBUG (" realloc: returning 0x%lx" - " (base:0x%lx, total_size:%d)\n", + MALLOC_DEBUG (-1, "realloc: returning 0x%lx (base:0x%lx, total_size:%d)", (long)mem, (long)MALLOC_BASE(mem), (long)MALLOC_SIZE(mem)); + else + MALLOC_DEBUG (-1, "realloc: returning 0"); return mem; } |