List of Phobos functions that allocate memory?

Iain Buclaw ibuclaw at gdcproject.org
Thu Feb 6 11:03:22 PST 2014


On 6 February 2014 18:05, Johannes Pfau <nospam at example.com> wrote:
> Am Thu, 06 Feb 2014 16:32:08 +0000
> schrieb "Dicebot" <public at dicebot.lv>:
>
>> On Thursday, 6 February 2014 at 16:28:25 UTC, Andrei Alexandrescu
>> wrote:
>> > Would anyone be willing to take on the ingrate task of creating
>> > a comprehensive list with all Phobos functions (and more
>> > generally artifacts) that allocate memory? That would help a
>> > lot with focusing the discussion.
>> >
>> > Andrei
>>
>> Merging https://github.com/D-Programming-Language/dmd/pull/1886
>> and running phobos unit tests should make it relatively simple,
>> at least for a first pass.
>
> That's only for implicit allocations though. And please, don't merge
> yet, it'll get another rewrite this weekend ;-)
>
> One interesting point is that module that were written with avoiding
> allocations in mind usually still allocate when throwing exceptions.
>
> Here's some example output for
> std.uuid/digest/path/range/algorithm/curl:
> http://dpaste.dzfl.pl/96d3725b06e2

That message will look much better with vcolumns.  ;)

Albeit, it also depends on moving fprint(global.stdmsg, ...)  =>  message(...)

http://dpaste.dzfl.pl/5b1961918ed6


More information about the Digitalmars-d mailing list