summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-10-31 10:31:56 +0000
committerDavid Mitchell <davem@iabyn.com>2010-10-31 11:54:02 +0000
commit5dfff8f3f610de1f338ad0c0b33fd879e96e9497 (patch)
treeb146f0e044cd7c4a768b2d6e5d41f9e0e19e6f68 /util.c
parent539ce3d8bf55f28e723b05e57a09f1390d907dc5 (diff)
downloadperl-5dfff8f3f610de1f338ad0c0b33fd879e96e9497.tar.gz
adjust output of -Dm
The address printed for malloc() didn't always match that for free(). Print the malloc() address *after* any modification by PERL_TRACK_MEMPOOL
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 20429f7587..f0b472a59c 100644
--- a/util.c
+++ b/util.c
@@ -99,7 +99,6 @@ Perl_safesysmalloc(MEM_SIZE size)
#endif
ptr = (Malloc_t)PerlMem_malloc(size?size:1); /* malloc(0) is NASTY on our system */
PERL_ALLOC_CHECK(ptr);
- DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05ld) malloc %ld bytes\n",PTR2UV(ptr),(long)PL_an++,(long)size));
if (ptr != NULL) {
#ifdef PERL_TRACK_MEMPOOL
struct perl_memory_debug_header *const header
@@ -122,6 +121,7 @@ Perl_safesysmalloc(MEM_SIZE size)
# endif
ptr = (Malloc_t)((char*)ptr+sTHX);
#endif
+ DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05ld) malloc %ld bytes\n",PTR2UV(ptr),(long)PL_an++,(long)size));
return ptr;
}
else {