RE: A non-sucking garbage collector

"Mark Hahn" <[email protected]> Tue, 27 Jul 2004 11:33:53 -0700
Newsgroups gmane.comp.lang.prothon.user
Message-ID <004401c47408$44e07e60$0b01a8c0@mark>
Paul Prescod wrote:

>Mark Hahn wrote:
>> I have figured out how to have my cake and eat it too. I 
>have a design 
>> for the world's only garbage collector that has all the desired 
>> features with no
>> trade-offs:
>> 
>> 1) Mark and sweep (tracing) for tunable maximum performance 
>including 
>> multiple cpus.
>> 
>> 2) Continuous operation.  Interpreter never stops (except for thread 
>> switching).
>> 
>> 3) Deterministic finalization can be added based on scope.
>
>Am I correct in thinking that this last feature is actually 
>unrelated to the others?

Yes.  I got carried away wanting my new wunderkind to have all possible
features.

>> ---- Deterministic finalization ----
>> 
>> The deterministic finalization can be added by a seperate mechanism 
>> Paul suggested.  A seperate frame-based object collector 
>mechanism is 
>> used in tandem with the one above that works in a Prothon 
>frame scope 
>> only. It reclaims objects immediately that were created in a 
>frame and 
>> never left the frame before the frame was destroyed.  This is 
>> analogous to local vars on a stack in C.  I will change the 
>wiki item 
>> that is in the 1.0 list for the future to specifically describe this 
>> feature.
>
>I'm not sure if I actually suggested this or forwarded a 
>suggestion about it.

Actually you did but I won't hold you to it.  :-)

>How do you tell if an object reference "ever left the frame?" 
>Wouldn't they almost always leave the frame? If you call 
>obj.foo(), the method "foo" sees a reference to its self 
>pointer and could store it away anywhere.

You may very well be right.  I'll investigate this in detail before I give
the talk.  Actually this feature is in the Wiki as a future feature, not a
1.0.