D's New GC and Object Allocation Pools

Maxime Chevalier-Boisvert via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 25 20:37:45 PDT 2014


Hello,

I was wondering if there have been updates regarding Andrei's 
announcement that he would rewrite the D garbage collector. Is 
there any kind of timeline for when a new version of the GC can 
be expected?

I also wanted to ask if there was an implementation of an object 
pool in the standard library. If not, I'm wondering what the best 
way to implement this is. Is there any way to overload new and 
destroy?

I was thinking of using the templated emplace operator from 
std.conv to allocate class objects into a large flat array, and 
to derive pool-allocated classes from a PoolObject base class. 
This base class would contain linked list pointers to implement a 
free list, as well as templated static methods to allocate and 
free the objects. Any advice welcome.


More information about the Digitalmars-d mailing list