From: Gurusamy Sarathy Date: Mon, 14 Feb 2000 07:27:21 +0000 (+0000) Subject: use system malloc() instead of sbrk() in Perl_malloc() under -DPURIFY X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e3663bad6e33b1f2ec45df9483f0907f7479b737;p=p5sagit%2Fp5-mst-13.2.git use system malloc() instead of sbrk() in Perl_malloc() under -DPURIFY p4raw-id: //depot/perl@5078 --- diff --git a/malloc.c b/malloc.c index 664fbe7..6f15090 100644 --- a/malloc.c +++ b/malloc.c @@ -916,6 +916,10 @@ emergency_sbrk(MEM_SIZE size) #define NBUCKETS (32*BUCKETS_PER_POW2 + 1) static union overhead *nextf[NBUCKETS]; +#if defined(PURIFY) && !defined(USE_PERL_SBRK) +# define USE_PERL_SBRK +#endif + #ifdef USE_PERL_SBRK #define sbrk(a) Perl_sbrk(a) Malloc_t Perl_sbrk (int size); @@ -1902,7 +1906,7 @@ Perl_dump_mstats(pTHX_ char *s) #ifdef USE_PERL_SBRK -# if defined(__MACHTEN_PPC__) || defined(NeXT) || defined(__NeXT__) +# if defined(__MACHTEN_PPC__) || defined(NeXT) || defined(__NeXT__) || defined(PURIFY) # define PERL_SBRK_VIA_MALLOC /* * MachTen's malloc() returns a buffer aligned on a two-byte boundary.