Precise GC state

Ola Fosheim Grøstad ola.fosheim.grostad+dlang at gmail.com
Thu Nov 23 21:40:26 UTC 2017


On Thursday, 23 November 2017 at 20:13:31 UTC, Adam Wilson wrote:
> I would focus on a generational GC first for two reasons. The

But generational GC only makes sense if many of your GC objects 
have a short life span. I don't think this fits well with 
sensible use of a language like D where you typically would try 
to put such allocations on the stack and/or use RAII or even an 
arena.

> The second is that you still typically have to stop the 
> execution of the thread on the Gen0 collection (the objects 
> most likely to be hot). So with a non-generational concurrent 
> collector you have to stop the thread for the entirety of the 
> scan, because you have no way to know which objects are hot and 
> which are cold.

How are you going to prove that references are all kept within 
the generation in D? There is some very costly book keeping 
involved that simply don't work well with D semantics.




More information about the Digitalmars-d mailing list