std.allocator: FreeList uses simple statistics to control number of items

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri May 22 18:59:55 PDT 2015


On 5/22/15 9:26 AM, Martin Nowak wrote:
> A one-pole low pass filter is a very efficient moving average.
> https://github.com/D-Programming-Language/druntime/blob/6e55b7aaff7566d374c2f253f831d3489e7fd1a5/src/gc/gc.d#L1732
> Feed it with 1 on hit and 0 on miss to get Phit on average.

On 5/22/15 9:19 AM, Martin Nowak wrote:
> You can look at jemalloc which has a GC algorithm for this problem.
> https://m.facebook.com/notes/facebook-engineering/scalable-memory-allocation-using-jemalloc/480222803919

These are both solid. Thanks!! -- Andrei


More information about the Digitalmars-d mailing list