diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-03 15:17:39 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-03 15:17:39 +0000 |
commit | fba3b22e783d72569126ff6fe76f3cb6cd1f043b (patch) | |
tree | a06e4145c0f1a902cb2070e0aaa8729cebfe5b6e /hv.c | |
parent | c23142e2edb5ee317dcd6cd29300b6f2196357db (diff) | |
download | perl-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.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); |