[M3devel] GC question
Neil T. Dantam
ndantam at purdue.edu
Mon Jan 14 22:05:34 CET 2008
Darko wrote:
> If I wanted to implement a 'reallocate' function that preserved
> references to an object although the object was reallocated, ie
> change all existing references from the old object to the new
> object, would this be straight forward using the code of the
> current GC implementation?
Probably not. Because precise pointer locations are not known for
the stacks, they are treated conservatively, and any objects
potentially referenced from the stacks are pinned in place by the
GC. It would be impossible to update references to your reallocated
object if those references live in the stack because we do not have
precise information for stack pointer locations.
--
Neil T. Dantam
More information about the M3devel
mailing list