Moving GC

dsimcha dsimcha at yahoo.com
Fri Dec 12 19:24:54 PST 2008


== Quote from Christopher Wright (dhasenan at gmail.com)'s article
> It means that you can't use one block for objects of multiple types.

Sure you can, without being any worse off than under the current scheme.  Mark the
contents of the memory as an array of void*s.  This would have the same effect as
marking it for GC scanning under the current scheme, basically making the GC scan
the block conservatively.  Furthermore, if you're storing value types or pointers
to reference types that also have a pointer stored in a GC-scanned block, set the
typeinfo to byte or something, and you have the equivalent of setting the NO_SCAN bit.




More information about the Digitalmars-d mailing list