Possibility to make __global_locale const to reduce RAM usage?
Damien George
damien.p.george@gmail.com
Thu Oct 19 13:09:00 GMT 2017
Hello,
As others have already noticed (see
https://sourceware.org/ml/newlib/2017/msg00192.html and
https://sourceware.org/ml/newlib/2017/msg00368.html), since newlib 2.5.0
the locale support pulls in the __global_locale struct which takes around
360 bytes of RAM, which is a lot on a resourced constrained microcontroller.
Would it be possible to make this data structure "const" so that it goes in
.text/.rodata/ROM instead of in .data/RAM? From a brief look at the code
it looks like this structure is usually only ever read from, not written
to, so this may be a possibility.
Best regards,
Damien.
More information about the Newlib
mailing list