Garbage collection book

Walter Bright newshound2 at digitalmars.com
Thu Oct 6 15:44:10 PDT 2011


On 10/6/2011 3:28 PM, Martin Nowak wrote:
> More realistically, are there any rough ideas how to support moving collectors?

The idea I used long ago was to move objects for which the only references to 
them are unambiguous, which means those unambiguous refs can be updated to point 
to the new location.

Ambiguous refs (i.e. might or might not be an actual pointer) had the effect of 
"pinning" the object so it couldn't be moved.

Doing a moving collector requires type info emitted by the compiler that gives 
the offsets of the pointers embedded in every allocated type.


More information about the Digitalmars-d mailing list