On 24/08/05, Brian Schr?der <ruby.brian / gmail.com> wrote:
> On 24/08/05, Geert Fannes <Geert.Fannes / ikanconsulting.com> wrote:
> > The c avl tree indeed keeps its data in c-format, not by using ruby objects since that would indeed not give any gain (and I'd have to write some mark and sweep functions). I will check my code and define all the variables in the most outer loop. Together with more regular checking, hopefully I can keep the memory under control. Thank you very much for this advice.
> >
> > [snip]

One gotcha I've only seen after sending the other mail is, that moving
the variables to the outer loop won't buy you anything. While the GC
is disabled, this should eat infinite amounts of memory

GC.disable
a = "empty-"
loop do a += "" end
GC.enable

regards,

Brian


-- 
http://ruby.brian-schroeder.de/

Stringed instrument chords: http://chordlist.brian-schroeder.de/