printf size requirement
Anders Lindgren
ali@df.lth.se
Mon Apr 23 15:37:00 GMT 2007
On Mon, 23 Apr 2007, Joel Sherrill wrote:
[snip]
>> --enable-newlib-reent-small enable small reentrant struct support
>>
> This looks promising for general RTEMS use since it doesn't sound like it
> disables any functionality. Any ideas how much difference it makes? It
> looks
> pretty substantial.
Without having actually measured, I don't think it saves you a whole lot
if your threads actually use libc a lot. It's primary function is to
postpone allocation of several reentrancy data fields to runtime as
needed, instead of always including them statically in struct reent. If
many of your threads only make trivial use of libc however, I guess there
could be interesting savings.
[snip]
>> --disable-newlib-atexit-alloc disable dynamic allocation of atexit
>> entries
>>
> Interesting trade-off but doesn't this limit you to one atexit() per thread?
AFAIK it only disables dynamic allocation of additional atexit() entries
beyond the 32 dictated by ANSI C. See e.g.: <sys/reent.h>.
[snip]
>> --enable-target-optspace optimize for space
..and this switches from using -O2 to -Os, and makes some libc functions
simpler, e.g. mem* and str* functions.
Take care,
ali:)
More information about the Newlib
mailing list