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:
0ed2b00
)
sv.c: Add comment
author
Karl Williamson
<khw@cpan.org>
Sat, 31 May 2014 18:45:41 +0000
(12:45 -0600)
committer
Karl Williamson
<khw@cpan.org>
Sun, 1 Jun 2014 01:09:22 +0000
(19:09 -0600)
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
bb7481a
..
13ea53c
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-1584,6
+1584,9
@@
Perl_sv_grow(pTHX_ SV *const sv, STRLEN newlen)
if (newlen < minlen)
newlen = minlen;
#ifndef PERL_UNWARANTED_CHUMMINESS_WITH_MALLOC
+
+ /* Don't round up on the first allocation, as odds are pretty good that
+ * the initial request is accurate as to what is really needed */
if (SvLEN(sv)) {
newlen = PERL_STRLEN_ROUNDUP(newlen);
}