disable malloced_size() feedback with -DLEAKTEST
Ilya Zakharevich [Mon, 20 Jul 1998 21:20:21 +0000 (17:20 -0400)]
Message-Id: <199807210120.VAA15031@monk.mps.ohio-state.edu>
Subject: [PATCH 5.004_75] -DLEAKTEST broken

p4raw-id: //depot/perl@1603

av.c
sv.c

diff --git a/av.c b/av.c
index 2f9c617..b5c9bc2 100644 (file)
--- a/av.c
+++ b/av.c
@@ -92,7 +92,7 @@ av_extend(AV *av, I32 key)
                U32 bytes;
 #endif
 
-#if defined(MYMALLOC) && !defined(PURIFY)
+#if defined(MYMALLOC) && !defined(PURIFY) && !defined(LEAKTEST)
                newmax = malloced_size((void*)AvALLOC(av))/sizeof(SV*) - 1;
 
                if (key <= newmax) 
diff --git a/sv.c b/sv.c
index db77f72..3652b9d 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1118,7 +1118,7 @@ sv_grow(SV* sv, unsigned long newlen)
        s = SvPVX(sv);
     if (newlen > SvLEN(sv)) {          /* need more room? */
        if (SvLEN(sv) && s) {
-#if defined(MYMALLOC) && !defined(PURIFY)
+#if defined(MYMALLOC) && !defined(PURIFY) && !defined(LEAKTEST)
            STRLEN l = malloced_size((void*)SvPVX(sv));
            if (newlen <= l) {
                SvLEN_set(sv, l);