This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: stack usage
- From: Tommy Reynolds <Tommy dot Reynolds at MegaCoder dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 22 Mar 2004 07:27:16 -0600
- Subject: Re: [ECOS] stack usage
- References: <1079956460.8290.7.camel@ambica>
Uttered Aravind B <arvindb@cranessoftware.com>, spake thus:
> First thread gives 100
> second,third and fourth threads gives 80 .
>
> My problem is in the third thread i have defined short variable.
> Inspite of it is giving value 80 as 2 and 4 thread.
>
> 2 and 4 thread is defined as
>
> void procedureB(cyg_addrword_t data)
> {
> printf("ThreadB %d\n",cyg_thread_measure_stack_usage( handleB));
> }
>
Why not show us the 3 thread that is giving showing the problem?
I suspect that the compiler just allocated your short variable into a
CPU register and not on the stack. Try using an "int foo[32]" array
instead.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss