This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Possibility to make __global_locale const to reduce RAM usage?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]