Hi,

In message "Re: [ruby-core:25674] [Feature #2126] ruby_init_stack() - add ability to specify or query max_stack_size"
    on Mon, 21 Sep 2009 02:42:14 +0900, Suraj Kurapati <redmine / ruby-lang.org> writes:

|  This way, I can provide a custom stack to Ruby:
|
|     size_t stack_size = ruby_stack_size_preference();
|     bool stack_descends = ruby_stack_descends_p();
|
|     VALUE* stack_start = malloc(stack_size);
|
|     if (stack_descends) {
|       stack_start += stack_size;
|     }
|
|     ruby_init_stack(stack_start, stack_size);

As far as I know, there's no portable way to switch machine stack to
pre-allocated heap region.  I'm happy to be proven wrong.

							matz.