summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hv.c b/hv.c
index 454ee231cb..1e2c81b872 100644
--- a/hv.c
+++ b/hv.c
@@ -618,9 +618,9 @@ HV *hv;
assert(tmp >= newsize);
New(2,a, tmp, HE*);
Copy(xhv->xhv_array, a, oldsize, HE*);
- if (oldsize >= 64 && !nice_chunk) {
- nice_chunk = (char*)xhv->xhv_array;
- nice_chunk_size = oldsize * sizeof(HE*) * 2 - MALLOC_OVERHEAD;
+ if (oldsize >= 64) {
+ offer_nice_chunk(xhv->xhv_array,
+ oldsize * sizeof(HE*) * 2 - MALLOC_OVERHEAD);
}
else
Safefree(xhv->xhv_array);
@@ -692,9 +692,9 @@ IV newmax;
assert(j >= newsize);
New(2, a, j, HE*);
Copy(xhv->xhv_array, a, oldsize, HE*);
- if (oldsize >= 64 && !nice_chunk) {
- nice_chunk = (char*)xhv->xhv_array;
- nice_chunk_size = oldsize * sizeof(HE*) * 2 - MALLOC_OVERHEAD;
+ if (oldsize >= 64) {
+ offer_nice_chunk(xhv->xhv_array,
+ oldsize * sizeof(HE*) * 2 - MALLOC_OVERHEAD);
}
else
Safefree(xhv->xhv_array);