Pie Squared wrote:
> So, my question is, does Ruby's GC (which is a mark-and-sweep
> collector, I believe) deal with segmentation, and if it does, how?
> Also, how does it deal with internal pointers to objects on the heap
> if those objects are moved? (I mean, if theres a pointer to an object
> in the heap, and the object is moved, how does Ruby locate it again?
> Or does it avoid this situation by using some sort of lookup
> mechanism?)

Ruby 1.8.6 and 1.9 do not have compacting collectors, so the memory 
space gets increasingly more segmented.

JRuby is based on the JVM, which boasts some of the best GC 
implementations in the world. Rubinius also has a simple generational 
compacting M/S GC that avoids segmentation. As I understand it, memory 
segmentation/fragmentation in Ruby 1.8.6 and Ruby 1.9 are a serious 
problem for long-running applications.

- Charlie