summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-14 07:27:21 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-14 07:27:21 +0000
commite3663bad6e33b1f2ec45df9483f0907f7479b737 (patch)
treede2bd3401b59e0ef0ef5ceb6e53998d7d311ea1d /malloc.c
parent4728200148c90f3ebcfc7ead8f99f7055a29d443 (diff)
downloadperl-e3663bad6e33b1f2ec45df9483f0907f7479b737.tar.gz
use system malloc() instead of sbrk() in Perl_malloc() under -DPURIFY
p4raw-id: //depot/perl@5078
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/malloc.c b/malloc.c
index 664fbe7df8..6f15090589 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.