$\1 and serious bug in evalling
[p5sagit/p5-mst-13.2.git] / malloc.c
index df72105..3aeb088 100644 (file)
--- a/malloc.c
+++ b/malloc.c
@@ -2,10 +2,6 @@
  *
  */
 
-#if defined(PERL_CORE) && !defined(DEBUGGING_MSTATS)
-#  define DEBUGGING_MSTATS
-#endif 
-
 #ifndef lint
 #  if defined(DEBUGGING) && !defined(NO_RCHECK)
 #    define RCHECK
@@ -785,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;
@@ -800,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;