[M3devel] GC question version 2
Darko
darko at darko.org
Wed Jan 16 21:52:31 CET 2008
Thanks, I probably will have to use some combination of encapsulation
and indirection, but that solution isn't cheaper in terms of memory,
which might be a problem in what is an all-allocated data structure
(ie, every field value is allocated). I'm basically investigating all
possible approaches and not against the solution you've suggested.
On 16/01/2008, at 12:27 PM, Tony Hosking wrote:
> This might be possible, but probably would force completion of the
> current GC to get all the references. Again, not a particularly
> nice thing to be doing. Once again, why not use indirection and
> weak references. Probably cheaper, more flexible and portable.
>
> On Jan 16, 2008, at 1:28 PM, Darko wrote:
>
>> Ok, a slightly different approach: Can the GC give me a list of all
>> the objects that contain a reference to an object? Would it be
>> thorough (ie not miss any objects)? False positives might be ok.
>> Then I could check the type of each object and update the
>> references myself. It would be reasonable to assume that the
>> references in question were not being changed by any thread during
>> the checking process.
>>
>> Thanks,
>> Darko.
>
More information about the M3devel
mailing list