Change 16342 by jhi@alpha on 2002/05/02 13:06:18
Subject: Re: [ID 20020425.009] perlio & -Dm dumps core
From: Hugo van der Sanden <[EMAIL PROTECTED]>
Date: Thu, 02 May 2002 04:22:02 +0100
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/malloc.c#94 edit
Differences ...
==== //depot/perl/malloc.c#94 (text) ====
Index: perl/malloc.c
--- perl/malloc.c.~1~ Thu May 2 07:15:05 2002
+++ perl/malloc.c Thu May 2 07:15:05 2002
@@ -356,9 +356,16 @@
#ifdef DEBUGGING
# undef DEBUG_m
-# define DEBUG_m(a) \
+# define DEBUG_m(a) \
STMT_START { \
- if (PERL_GET_INTERP) { dTHX; if (DEBUG_m_TEST) { a; } } \
+ if (PERL_GET_INTERP) { \
+ dTHX; \
+ if (DEBUG_m_TEST) { \
+ PL_debug &= ~DEBUG_m_FLAG; \
+ a; \
+ PL_debug |= DEBUG_m_FLAG; \
+ } \
+ } \
} STMT_END
#endif
@@ -1103,11 +1110,6 @@
return (NULL);
}
- DEBUG_m(PerlIO_printf(Perl_debug_log,
- "0x%"UVxf": (%05lu) malloc %ld bytes\n",
- PTR2UV(p), (unsigned long)(PL_an++),
- (long)size));
-
/* remove from linked list */
#if defined(RCHECK)
if ((PTR2UV(p)) & (MEM_ALIGNBYTES - 1)) {
@@ -1128,6 +1130,11 @@
MALLOC_UNLOCK;
+ DEBUG_m(PerlIO_printf(Perl_debug_log,
+ "0x%"UVxf": (%05lu) malloc %ld bytes\n",
+ PTR2UV(p), (unsigned long)(PL_an++),
+ (long)size));
+
#ifdef IGNORE_SMALL_BAD_FREE
if (bucket >= FIRST_BUCKET_WITH_CHECK)
#endif
End of Patch.