From: Archie Cobbs (archie@whistle.com)
Date: Mon Jan 04 1999 - 14:39:27 EST
Godmar Back writes:
> I think I got it fixed now. You might want to take a look.
Godmar,
Thanks for taking over where I left off with the utf8 stuff..
I want to try to understand what you're doing, but I'm not
completely clear on it..
> In my opinion, there was no way around destructors for class objects;
> the existing finalizer mechanism simply would not have guaranteed that
> class objects survive all instances of the class.
One thing I don't understand is how could an object outlive the
Class object of which it is an instance? Doesn't every object
contain a pointer to it's Class object (at least implicitly)?
Also, is the root of the problem here that when you finalize something,
it may come back to life? And so you need a separate 'destructor'
that's called when you know for sure that the object is going away?
In other words, my assumption was that a Class object would have
lots of utf8const's in it. When the object was finalized, we would
simply need to release all of those utf8consts.. but you're saying
that the destructor would do this instead.. presumably because
finalization is not really final?
Sorry for my ignorance.. :-)
> One thing I've been thinking of is restructuring the gc interface such
> that the VM could register allocation types as triples
> (walkFunction, finalizeFunction, destroyFunction) with the gc subsystem.
> The gc subsystem would return a handle that the VM could use for future
> allocations. This handle would take the place of `GC_ALLOC_XXX'.
>
> The gc subsystem would export the markObject and a markObjectPrecise
> function that could be used to implement the walkMethods.
> It could also export walkConservative for convenience.
> If I'm not mistaken, this is how many gc packages work. At least those
> that allow users to supply their own walk functions.
This makes sense to me.
-Archie
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:28 EDT