summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-03 15:17:39 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-03 15:17:39 +0000
commitfba3b22e783d72569126ff6fe76f3cb6cd1f043b (patch)
treea06e4145c0f1a902cb2070e0aaa8729cebfe5b6e /hv.c
parentc23142e2edb5ee317dcd6cd29300b6f2196357db (diff)
downloadperl-fba3b22e783d72569126ff6fe76f3cb6cd1f043b.tar.gz
Fixed sv_mutex locking for new_SV, del_SV and nice_chunks.
p4raw-id: //depot/perl@103
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);