RFC: Pinning interface for the GC
David Nadlinger
see at klickverbot.at
Sat Oct 13 12:24:52 PDT 2012
On Saturday, 13 October 2012 at 18:58:27 UTC, Alex Rønne
Petersen wrote:
> This is kind of terrible because adding the chunk of memory as
> a root forces the GC to actually scan it, which is unnecessary
> when what you really want is to pin the object in place and
> tell the GC "I know what I'm doing, don't touch this".
If pointers in pinned objects make their targets live, there
would be no difference to simply adding the object as a root. So
in your proposal, pinned objects are implicitly marked live if
they aren't reachable from any of the roots, but any other
objects reachable only from a pinned object but not from a root
would be collected – correct?
David
More information about the Digitalmars-d
mailing list