diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2002-09-23 20:33:12 +0200 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-09-26 08:16:43 +0000 |
commit | 7bab3ede7bf671f54f0d8f3d55d015d9c9882812 (patch) | |
tree | c955efd9da330d34eed618bb2ab9ac7e8a9e6034 /handy.h | |
parent | e6604a4dbe27f47e1c7f869847acedb8b382cb8f (diff) | |
download | perl-7bab3ede7bf671f54f0d8f3d55d015d9c9882812.tar.gz |
LEAKTEST is dead, RIP
Subject: Re: [perl #17197] SIGSEGV in perl 5.8.0 multithread build with -DLEAKTEST
From: "H.Merijn Brand" <h.m.brand@hccnet.nl>
Message-Id: <20020923182824.C7B6.H.M.BRAND@hccnet.nl>
p4raw-id: //depot/perl@17920
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 36 |
1 files changed, 0 insertions, 36 deletions
@@ -516,18 +516,6 @@ typedef U16 line_t; /* - XXX LEAKTEST doesn't really work in perl5. There are direct calls to - safemalloc() in the source, so LEAKTEST won't pick them up. - (The main "offenders" are extensions.) - Further, if you try LEAKTEST, you'll also end up calling - Safefree, which might call safexfree() on some things that weren't - malloced with safexmalloc. The correct "fix" to this, if anyone - is interested, is to ensure that all calls go through the New and - Renew macros. - --Andy Dougherty August 1996 -*/ - -/* =head1 SV Manipulation Functions =for apidoc Am|SV*|NEWSV|int id|STRLEN len @@ -589,8 +577,6 @@ hopefully catches attempts to access uninitialized memory. #define NEWSV(x,len) newSV(len) -#ifndef LEAKTEST - #define New(x,v,n,t) (v = (t*)safemalloc((MEM_SIZE)((n)*sizeof(t)))) #define Newc(x,v,n,t,c) (v = (c*)safemalloc((MEM_SIZE)((n)*sizeof(t)))) #define Newz(x,v,n,t) (v = (t*)safemalloc((MEM_SIZE)((n)*sizeof(t)))), \ @@ -601,28 +587,6 @@ hopefully catches attempts to access uninitialized memory. (v = (c*)saferealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t)))) #define Safefree(d) safefree((Malloc_t)(d)) -#else /* LEAKTEST */ - -#define New(x,v,n,t) (v = (t*)safexmalloc((x),(MEM_SIZE)((n)*sizeof(t)))) -#define Newc(x,v,n,t,c) (v = (c*)safexmalloc((x),(MEM_SIZE)((n)*sizeof(t)))) -#define Newz(x,v,n,t) (v = (t*)safexmalloc((x),(MEM_SIZE)((n)*sizeof(t)))), \ - memzero((char*)(v), (n)*sizeof(t)) -#define Renew(v,n,t) \ - (v = (t*)safexrealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t)))) -#define Renewc(v,n,t,c) \ - (v = (c*)safexrealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t)))) -#define Safefree(d) safexfree((Malloc_t)(d)) - -#define MAXXCOUNT 1400 -#define MAXY_SIZE 80 -#define MAXYCOUNT 16 /* (MAXY_SIZE/4 + 1) */ -extern long xcount[MAXXCOUNT]; -extern long lastxcount[MAXXCOUNT]; -extern long xycount[MAXXCOUNT][MAXYCOUNT]; -extern long lastxycount[MAXXCOUNT][MAXYCOUNT]; - -#endif /* LEAKTEST */ - #define Move(s,d,n,t) (void)memmove((char*)(d),(char*)(s), (n) * sizeof(t)) #define Copy(s,d,n,t) (void)memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) #define Zero(d,n,t) (void)memzero((char*)(d), (n) * sizeof(t)) |