[ECOS] Stack usage measurement
Mon Apr 20 10:21:00 GMT 2009
Szentirmai Gergely wrote:
> Does anybody has a estimation about the stack usage of pintf stuff? [...]
> As a summary, I would have to avoid the usage of any printf if I'm short
> of memory?
printf (or, more precisely, the actual format conversion in vfnprintf) is
really quite a complicated function. This regularly bites people on limited
targets; sometimes simply using printf is enough to cause your application
to fail to link because it won't fit into RAM.
If you don't need to print out floating point numbers, you might save a
little code size by disabling that support in your eCos config. Otherwise,
puts and putc are pretty lean and mean - you could save a lot of code and
stack if you can avoid printf in your application.
Embedded Software Engineer, eCosCentric Limited.
Barnwell House, Barnwell Drive, Cambridge CB5 8UU, UK.
Registered in England no. 4422071. www.ecoscentric.com
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