From: Eric Wong Date: 2011-06-11T16:14:06+09:00 Subject: [ruby-core:36997] Re: [Ruby 1.9 - Feature #4614] [RFC/PATCH] thread_pthread.c: lower RUBY_STACK_MIN_LIMIT to 64K Koichi Sasada 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