Garbage Collection for Systems Programmers

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Apr 9 12:57:25 UTC 2024


On 09/04/2024 7:17 PM, Gregor Mückl wrote:
> On Tuesday, 9 April 2024 at 00:47:55 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> D is in an excellent position to make write barriers opt-in, with 
>> different strategies allowing for different GC designs.
>>
>> Its not an all or nothing situation that people seem to want it to be.
>>
>> We can get the write barriers implemented and let some PhD students 
>> implement some more advanced GC designs.
> 
> How would you add write barriers to D? Is it possible without extending 
> the language?

Its a glue code layer thing.

If you emit a write, guard it with a call into the GC (or if we have a 
known specific strategy that instead).

The language won't need to change, its all under the hood!

Other languages like Java change write barrier behavior a plenty. The 
bytecode however doesn't change when it does.


More information about the Digitalmars-d mailing list