To switch GC from FIFO to LIFO paradigm.

tsbockman thomas.bockman at gmail.com
Fri Jan 15 20:19:18 UTC 2021


On Friday, 15 January 2021 at 12:39:30 UTC, MGW wrote:
> GC cleans memory using the FIFO paradigm. Is it possible to 
> switch GC to work using the LIFO paradigm?

As others already said, the current GC isn't FIFO; it just scans 
everything once in a while a frees whatever it can, new or old.

However, generational GCs are somewhat closer to LIFO than what 
we have now, which does provide some performance gains under 
common usage patterns. People have discussed adding a 
generational GC to D in the past, and I think the conclusion was 
that it requires pervasive write barriers (not the atomics kind), 
which leadership considers inappropriate for D for other reasons.


More information about the Digitalmars-d-learn mailing list