summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorSlaven Rezic <slaven@rezic.de>2007-10-26 18:58:55 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-06-21 14:33:18 +0000
commita73918ec93a602356d85f41060eaacc67da45b23 (patch)
treedc33a9bde5500bfb3cb2f267467ba45edcf1103c /malloc.c
parent79a3ac157a0fcf79cdd9388c59025a2ad55d224a (diff)
downloadperl-a73918ec93a602356d85f41060eaacc67da45b23.tar.gz
Re: [perl #46381] "Out of memory ... sbrk()" on FreeBSD-6.x for v.5.8.x but not v.5.6.x
Message-ID: <874pgd6hxs.fsf@biokovo-amd64.herceg.de> p4raw-id: //depot/perl@34076
Diffstat (limited to 'malloc.c')
-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;