std.allocator: FreeList uses simple statistics to control number of items
Etienne Cimon via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 20 19:54:49 PDT 2015
What you could do is calculate the average allocation size and std
deviantions in a moving window, and the z-score for each freelist and
use this lookup table:
https://www.stat.tamu.edu/~lzhou/stat302/standardnormaltable.pdf
If P < 0.10 (maybe use this as a setting) this means the probability of
the next allocations going through this freelist is too low and you can
decide to tighten the freelist and let the deallocations fall through to
the underlying allocator.
More information about the Digitalmars-d
mailing list