Ian Lance Taylor <i...@google.com> writes:

> I've put a project proposal for split stacks on the wiki at
> http://gcc.gnu.org/wiki/SplitStacks .  The idea is to permit the stack
> of a single thread to be split into discontiguous segments, thus
> permitting many more threads to be active at one time without worrying
> about stack overflow or about wasting lots of stack space for inactive
> threads.  The compiler would have to generate code to support detecting
> when new stack space is needed, and to deal with some of the
> consequences of moving to a new stack.

This is mainly for 32bit systems with tight address space right? On a
64bit system you could just do it through the MMU by reserving enough
free VM space for the stack in advance and then handling the page fault.

> I would be interested in hearing comments about this.

In the wiki: Possible strategies 1. 

Should that be "Each function with a _large_ stack frame" ?

Or perhaps for all functions. After all even functions with 
small frame can be nested a lot.

How about alloca() in your scheme?

-Andi

Reply via email to