develooper Front page | perl.perl5.changes | Postings from December 2023

[Perl/perl5] a75979: locale.c: Avoid unnecessary malloc

From:
Karl Williamson via perl5-changes
Date:
December 30, 2023 16:52
Subject:
[Perl/perl5] a75979: locale.c: Avoid unnecessary malloc
Message ID:
Perl/perl5/push/refs/heads/blead/88e58f-a75979@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: a7597962a60c35a01758a96b3cda28f433648844
      https://github.com/Perl/perl5/commit/a7597962a60c35a01758a96b3cda28f433648844
  Author: Karl Williamson <khw@cpan.org>
  Date:   2023-12-30 (Sat, 30 Dec 2023)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  locale.c: Avoid unnecessary malloc

Here an SV is being created with a size, but immediately
sv_usepvn_flags() is called to place an already allocated and populated
PV into it, so that initial size is wasted.





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About