On 12.02 04:01, Mathieu Bouchard wrote:
> I think I recall that Ruby 1.8 was supposed to get a new garbage
> collector. It appears not to be the case. However, I wonder whether
> there's a patch that I could apply to Ruby (1.6.8 or 1.8.0) that would
> improve the "realtimeness" of Ruby in any way. Specifically, I mean
> anything that would make the worst-case duration of a GC interruption
> smaller.

There exists a patch which implements a non-copying generational GC 
for ruby. But the patch[1] is quite old (1.4.4). The code looks 
quite easy to understand and porting it to 1.8 should be possible.
"Ruby Hacking Guide" (a japanese book) has apparently some 
information on the topic too. Ruby's own GC is very clean code so it
should provide you with enough information about the interfaces.

However you need to be aware that realtime and generational GC are for
different purposes. A generational GC reduces the average time it takes
to sweep, while a real time collector makes guarantees about the
worst-case. I haven't heard of any real-time collector for Ruby.

I don't know what happened to the 1.8 generational GC plan, maybe
someone more knowledgeable would like to enlighten us.

1) http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/9990

- Einar Karttunen