This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Split Stacks proposal
- From: Ian Lance Taylor <iant at google dot com>
- To: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Cc: "gcc\ at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 26 Feb 2009 14:15:45 -0800
- Subject: Re: Split Stacks proposal
- References: <m3d4d497lk.fsf@google.com> <49A713AF.5040508@oarcorp.com>
Joel Sherrill <joel.sherrill@OARcorp.com> writes:
> Ian Lance Taylor wrote:
>> 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.
>>
>> I would be interested in hearing comments about this.
>>
>> I'm not currently working on this, but I may start working on it at some
>> point.
>>
> How would this work on an embedded system which normally
> has fixed task stacks?
>
> How would you know if a single task had consumed too much
> of its stack space?
I wasn't really envisioning using it in that way, but, yes, it could do
that. The general goal is for use on systems where there is a lot of
available memory, but there isn't enough memory to support peak stack
usage for all threads.
Ian