On Friday, 15 January 2021 at 15:36:37 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 15 January 2021 at 15:20:05 UTC, jmh530 wrote:
Hypothetically, would it be possible for users to supply their
own garbage collector that uses write barriers?
Yes. You could translate Google Chrome's Oilpan to D. It uses
library smart pointers for dirty-marking. But it requires you
to write a virtual function that points out what should be
traced (actually does the tracing for the outgoing pointers
from that object):
The library smart pointers would make it difficult to interact
with existing D GC code though.