This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b2a466
)
As 2/3rds (or 3/4s) of the SV head structure is rewritten, it doesn't
author
Nicholas Clark
<nick@ccl4.org>
Thu, 17 Jun 2004 19:27:05 +0000
(19:27 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Thu, 17 Jun 2004 19:27:05 +0000
(19:27 +0000)
seem that memzero() of everything is the most efficient idea.
p4raw-id: //depot/perl@22945
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
57ca682
..
371d17e
100644
(file)
--- 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++;
}