summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>2003-07-15 00:46:58 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2003-07-24 07:02:31 +0000
commit6af660ee01c05048b7704273e88e9249deb8202f (patch)
tree925b5135325dc32711b43fce548e19d23a7091f4 /malloc.c
parent830b38bd9aba3b182891b9a2d5cae8a220294dee (diff)
downloadperl-6af660ee01c05048b7704273e88e9249deb8202f.tar.gz
malloc cleanup
Message-ID: <20030715144657.GA21313@math.berkeley.edu> p4raw-id: //depot/perl@20184
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/malloc.c b/malloc.c
index 0656064177..6013e40083 100644
--- a/malloc.c
+++ b/malloc.c
@@ -1068,6 +1068,12 @@ static IV MallocCfg[MallocCfg_last] = {
};
IV *MallocCfg_ptr = MallocCfg;
+static char* MallocCfgP[MallocCfg_last] = {
+ 0, /* MallocCfgP_emergency_buffer */
+ 0, /* MallocCfgP_emergency_buffer_prepared */
+};
+char **MallocCfgP_ptr = MallocCfgP;
+
# undef MIN_SBRK
# undef FIRST_SBRK
# undef MIN_SBRK_FRAC1000
@@ -1090,6 +1096,9 @@ IV *MallocCfg_ptr = MallocCfg;
# define FILL_CHECK_CFG MallocCfg[MallocCfg_fillcheck]
# define FILL_CHECK (FILL_DEAD && FILL_CHECK_CFG)
+# define emergency_buffer MallocCfgP[MallocCfgP_emergency_buffer]
+# define emergency_buffer_prepared MallocCfgP[MallocCfgP_emergency_buffer_prepared]
+
#else /* defined(NO_MALLOC_DYNAMIC_CFG) */
# define FILL_DEAD 1
@@ -1121,14 +1130,13 @@ static u_int goodsbrk;
# define BIG_SIZE (1<<16) /* 64K */
# endif
-static char *emergency_buffer;
-static char *emergency_buffer_prepared;
-
# ifdef NO_MALLOC_DYNAMIC_CFG
static MEM_SIZE emergency_buffer_size;
/* 0 if the last request for more memory succeeded.
Otherwise the size of the failing request. */
static MEM_SIZE emergency_buffer_last_req;
+static char *emergency_buffer;
+static char *emergency_buffer_prepared;
# endif
# ifndef emergency_sbrk_croak