What are your hopes for the future D GC

Random D user via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 29 12:19:47 PDT 2017


I just got curious, after reading the GC analysis blog post. What 
kind of features people generally would want for the GC (in the 
distant murky future of 1999)?

Here's some of my nice to haves:

1. Thread local GCs. D is by default thread local, so it kind of 
would make sense and goodbye stop everything GC.

2. Composable custom memory block GC. The ability to mallocate 
128MB memory block and create a new GC instance to manage that 
block. It would only need to scan that 128MB block and not worry 
about rest of memory and resources (with complex destruction 
orders) in 16GB heap. This way you probably could guarantee good 
collection times for some subsystems in your program and use your 
favorite allocator for others.

3. Callbacks to GC operations. I have timeline profiler 
implemented for my project. It would be quite cool to have GC 
collection starts and stops record a timestamp for the timeline.
(Can this be done already? Hopefully without recompiling the GC. 
I tried to look but I couldn't find any hooks in the docs.)

4. Incremental GC with collection time limit. Is this even viable 
for D?


More information about the Digitalmars-d mailing list