summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/malloc.c b/malloc.c
index e9b200ba69..3aeb08846c 100644
--- a/malloc.c
+++ b/malloc.c
@@ -781,6 +781,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;
@@ -796,6 +799,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;