This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ARM startup stack & C++


On Wed, Aug 08, 2001 at 05:15:31PM +0200, Robin Farine wrote:
> Hi gang,
> 
> I have got some stack overflow during execution of non-trivial static
> initializers with C++ programs. The file vectors.S for ARM declares a startup
> stack of 512 bytes when configured for separate interrupt stack. What do you
> think I should do to get a big stack for initializers/finalizers?
> 
> 1) Change the hardcoded 512 into 8192 ;-)

Not a good idea. The patch will get lost/forgotten when you hand the
completed code over the industrilisation team of intergration. 

> 
> 2) Add a configuration option for the startup stack size but nothing will use
>    this "big" area afterwards, correct?

Sounds reasonable. Anyone with a non-trivial static initialiser
probably has enough MB of memory that 8K is will not be missed. 

> 4) A completely different and wonderful solution?

Change your static to dynamic initialisationm so it can be done in the
context of a thread you can control the size of the stack.

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]