Koichi Sasada <redmine / ruby-lang.org> wrote:
> GC eats large stack size if there are nested object (deep nested array
> and so on).  I'm not sure but I think this is why we allocate 512KB
> for stack.

Good point.  I didn't think of that (rare case for me).  We would need a
non-recursive implementation of gc_mark_children.

A simpler idea would be a dedicated marking thread with a deeper stack;
but I think that's ugly.

> Any comments?
> 
> I think that Thread.new should accept stack size.

I'm not sure what the API would be.  While it would help me, I think it
would be difficult to use and too low level for Ruby.

Meanwhile I can rebuild Ruby or use a trivial LD_PRELOAD:
http://yhbt.net/libministack.c

-- 
Eric Wong