More std.allocator goodies coming your way: better statistics

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Mon May 18 23:43:18 PDT 2015


On 2015-05-18 20:53, Andrei Alexandrescu wrote:
> Beautiful statistics accumulated for the allocator instance and/or per
> call location:
>
> http://erdani.com/d/phobos-prerelease/std_experimental_allocator_stats_collector.html
>
>
> https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/stats_collector.d
>
>
> Destructors welcome.

Since Options.all is the default value in StatsCollector. I think "all" 
should be the first member of "Options". Then this will be the default 
value when declaring variables of the type "Options" without 
initializing them.

You have abbreviated "options" to "opts" in PerCallStatistics, I don't 
think that gains much and you haven't abbreviated anything else, 
exception the Options members.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list