summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--malloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/malloc.c b/malloc.c
index 914436e968..df199c69bd 100644
--- a/malloc.c
+++ b/malloc.c
@@ -2293,6 +2293,8 @@ Perl_realloc(void *mp, size_t nbytes)
nmalloc[bucket]--;
nmalloc[pow * BUCKETS_PER_POW2]++;
#endif
+ if (pow * BUCKETS_PER_POW2 > max_bucket)
+ max_bucket = pow * BUCKETS_PER_POW2;
*(cp - M_OVERHEAD) = pow * BUCKETS_PER_POW2; /* Fill index. */
MALLOC_UNLOCK;
goto inplace_label;