summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-08 10:19:27 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-08 10:19:27 +0000
commit93af7a870f71dbbb13443b4087703de0221add17 (patch)
treee767c53d4d4f1783640e5410f94655e45b58b3d0 /malloc.c
parentc116a00cf797ec2e6795338ee18b88d975e760c5 (diff)
parent2269e8ecc334a5a77bdb915666547431c0171402 (diff)
downloadperl-93af7a870f71dbbb13443b4087703de0221add17.tar.gz
Merge maint-5.004 branch (5.004_03) with mainline.
MANIFEST is out of sync. p4raw-id: //depot/perl@114
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/malloc.c b/malloc.c
index 828f2f7d5c..4513de84b6 100644
--- a/malloc.c
+++ b/malloc.c
@@ -2,6 +2,10 @@
*
*/
+#if defined(PERL_CORE) && !defined(DEBUGGING_MSTATS)
+# define DEBUGGING_MSTATS
+#endif
+
#ifndef lint
# if defined(DEBUGGING) && !defined(NO_RCHECK)
# define RCHECK
@@ -789,6 +793,9 @@ int size;
#ifdef PERL_CORE
reqsize = size; /* just for the DEBUG_m statement */
#endif
+#ifdef PACK_MALLOC
+ size = (size + 0x7ff) & ~0x7ff;
+#endif
if (size <= Perl_sbrk_oldsize) {
got = Perl_sbrk_oldchunk;
Perl_sbrk_oldchunk += size;
@@ -804,6 +811,9 @@ int size;
small = 1;
}
got = (IV)SYSTEM_ALLOC(size);
+#ifdef PACK_MALLOC
+ got = (got + 0x7ff) & ~0x7ff;
+#endif
if (small) {
/* Chunk is small, register the rest for future allocs. */
Perl_sbrk_oldchunk = got + reqsize;