From: Nicholas Clark Date: Thu, 17 Jun 2004 19:27:05 +0000 (+0000) Subject: As 2/3rds (or 3/4s) of the SV head structure is rewritten, it doesn't X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=978b032ee0573ed0a4c483f15a4340a9cf7e6b8c;p=p5sagit%2Fp5-mst-13.2.git As 2/3rds (or 3/4s) of the SV head structure is rewritten, it doesn't seem that memzero() of everything is the most efficient idea. p4raw-id: //depot/perl@22945 --- diff --git a/sv.c b/sv.c index 57ca682..371d17e 100644 --- a/sv.c +++ b/sv.c @@ -283,7 +283,6 @@ Perl_sv_add_arena(pTHX_ char *ptr, U32 size, U32 flags) SV* sva = (SV*)ptr; register SV* sv; register SV* svend; - Zero(ptr, size, char); /* The first SV in an arena isn't an SV. */ SvANY(sva) = (void *) PL_sv_arenaroot; /* ptr to next arena */ @@ -297,6 +296,7 @@ Perl_sv_add_arena(pTHX_ char *ptr, U32 size, U32 flags) sv = sva + 1; while (sv < svend) { SvANY(sv) = (void *)(SV*)(sv + 1); + SvREFCNT(sv) = 0; SvFLAGS(sv) = SVTYPEMASK; sv++; }