develooper Front page | perl.perl5.porters | Postings from September 2014

Re: sv_grow() and malloc()

Thread Previous | Thread Next
September 25, 2014 07:12
Re: sv_grow() and malloc()
Message ID:
On 23 September 2014 13:49, Dave Mitchell <> wrote:

> (this is spin-off from Reini's suggested work to tweak sv_grow()
> allocations).
> I've been thinking about about all our heuristics for growing (and
> over-growing) strings in sv_grow(), and how it's likely to interact with
> the OS's malloc() library.

At least one OS (sun maybe?) supports an introspection
routine Perl_safesysmalloc_size which exposes the canonical form of this

Use of this routine in sv.c caused problems with the new COW logic and the
readline stuff so I disabled it. It can be re-enabled by defining:


I do not recommend doing this, it confuses the COW logic quite a bit.


perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About