This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Split Stacks proposal
- From: Andi Kleen <andi at firstfloor dot org>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 27 Feb 2009 02:42:23 +0100
- Subject: Re: Split Stacks proposal
- References: <m3d4d497lk.fsf@google.com>
Ian Lance Taylor <iant@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