[ECOS] Stack usage measurement

Szentirmai Gergely reg@t-online.hu
Sun Apr 19 19:28:00 GMT 2009


Hello

I had a bad feeling about stack usage (perhaps measurement), and I have 
written a small testcode, to see what's really happening. It came with 
an interesting result. It seems to me, that 
cyg_thread_info.stack_used gives the max used stack size, not the 
actual. Is that right? According to the docs, it should give the current 
usage.

The test code is attached, I use arm-elf-gcc, ecos with default packages.

The result is also attached. I think that even the last stack usage 
should be equal with 144 Bytes.

Maybe I am wrong... maybe not.

Thank you!
Gergely Szentirmai
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stacktest.c
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20090419/8de39c03/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: result.txt
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20090419/8de39c03/attachment.txt>
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


More information about the Ecos-discuss mailing list