Incremental garbage collection
Elronnd
elronnd at elronnd.net
Fri Jan 21 12:52:02 UTC 2022
On Friday, 21 January 2022 at 12:26:42 UTC, Ola Fosheim Grøstad
wrote:
> It could, in theory, if you change the semantics of @nogc and
> annotate everything with @nogc that the collector must leave
> alone.
You do not. See my other post where I clarified what I meant
with this approach.
> You also need to prevent scannable pointers to be available
> through unions
You do not. You do need to do _something_ about unions, but you
do need to disallow pointers in them. The spec says to pin
objects which are in unions, which is a perfectly acceptable
solution. There are also cleverer solutions which violate that
clause of the spec but do not break any actual code.
> There is also no way for D to force barriers on linked code,
> hence the need for a breaking language level change at some
> level.
You can do it with name mangling. D is not binary compatible
between releases.
------------------------------------
Bottom line: no source-level changes are necessary.
More information about the Digitalmars-d
mailing list