https://issues.dlang.org/show_bug.cgi?id=17881
safety0ff.bugz <safety0ff.b...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |safety0ff.b...@gmail.com --- Comment #7 from safety0ff.bugz <safety0ff.b...@gmail.com> --- (In reply to Steven Schveighoffer from comment #6) > > If we add thread local free-lists to the GC, the overhead of allocating > > these from the GC instead of caching them in the AA would be rather small. > > Agreed, I think keeping the lists inside the GC is the most useful, and does > not expose any implementation details to the user. I think this is the only sane way of doing it. i.e. without over constraining the GC implementation or exposing the user to implementation details. I think the API should obviously should have the size of the elements as a separate arguments and provide as much information as malloc e.g.: GC.preload(size_t num, size_t size, uint ba = 0, const TypeInfo ti = null) Otherwise it relies on hope that the GC will pull from the same pool. --