This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ARM startup stack & C++
- To: Robin Farine <acnrf at dial dot eunet dot ch>
- Subject: Re: [ECOS] ARM startup stack & C++
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- Date: Wed, 8 Aug 2001 17:32:03 +0200
- Cc: ecos-discuss at sources dot redhat dot com
- References: <86ofpqshv0.fsf@halftrack.hq.acn-group.ch>
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