diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-07-04 04:15:59 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-07-04 04:15:59 +0000 |
commit | 612f20c37ac59506501c890e7f9285f551c793d2 (patch) | |
tree | 0a5b7c0359483a9ec5cf29ce04f10c0614f5ab88 /hv.c | |
parent | cf36064f875775fbd01f4387ab083483e8fa24f8 (diff) | |
download | perl-612f20c37ac59506501c890e7f9285f551c793d2.tar.gz |
fix large memory leak that has been around for ever, masked by
-DPURIFY (most of the arenas were never freed!)
p4raw-id: //depot/perl@6298
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -42,9 +42,14 @@ S_more_he(pTHX) { register HE* he; register HE* heend; - New(54, PL_he_root, 1008/sizeof(HE), HE); - he = PL_he_root; + XPV *ptr; + New(54, ptr, 1008/sizeof(XPV), XPV); + ptr->xpv_pv = (char*)PL_he_arenaroot; + PL_he_arenaroot = ptr; + + he = (HE*)ptr; heend = &he[1008 / sizeof(HE) - 1]; + PL_he_root = ++he; while (he < heend) { HeNEXT(he) = (HE*)(he + 1); he++; |