Hello Michael,

MN> Martin Pirker wrote:
>> "EustŠ“uio Rangel de Oliveira Jr." <eustaquiorangel / yahoo.com> wrote:
>> 
>>>And, do you have some links about the the Ruby mark-and-sweep type of
>>>garbage?
>> 
>> 
>> While I lack the skill to go source diving, I too am interested in more
>> info about the gc.
>> We use conservative gc [talk:102873], ok
>> 
>> So, can one help gc?
>> e.g. if an Array or Hash is no longer needed, does an Array.clear or
>> Hash.clear actually zero all internal pointers to help/speed up gc?

MN> Yes, that should help, as the mark function would no more mark all the
MN> value. But I doubt that would be much of a performance win, because if
MN> the array-object goes out of scope (it's no more reachable), it's mark
MN> function would no longer be called. So, you would not want to call
MN> #clear. But that's just my understanding...

This would only help if there is something on the stack that looks
like an address to this array object. The chance for this is very low
and so the performance win. With the Boehm-Weisser GC i a measurable
memory reduction (~20%) by doing this for eiffel. But Boehm-Weisser
scans everything conservative and not only the heap like ruby.

-- 
 Best regards,                        emailto: scholz at scriptolutions dot com
 Lothar Scholz                        http://www.ruby-ide.com
 CTO Scriptolutions                   Ruby, PHP, Python IDE 's