[hackathon] My and Walter's ideas
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Mon Apr 27 04:43:32 PDT 2015
On 4/27/15 7:10 AM, Martin Nowak wrote:
> On Monday, 27 April 2015 at 10:56:17 UTC, Steven Schveighoffer wrote:
>> The only thing is to have a malloc-based AA for tracking
>
> https://github.com/D-Programming-Language/druntime/blob/18d57ffe3eed8674ca2052656bb3f410084379f6/src/rt/util/container/hashtab.d
sweet, that makes things REALLY trivial :)
>
>
>> However, note that this wouldn't track allocations that the compiler
>> did for closures.
>
> Plain _d_allocmemory.
OK, I wasn't sure how it worked. But this really doesn't help much for
fine-grained statistics gathering. In what situations does this function
get called by the compiler? If it's just for closures, we can lump all
closure allocations together in one stat. If you see closures are your
big nemesis, it may be time to redesign :)
-Steve
More information about the Digitalmars-d
mailing list