Type of memory advantage of the nano printf and malloc versions
Thu May 13 16:54:00 GMT 2021
Regarding the nano version of printf etc:
This builds NEWLIB with a special implementation of formatted I/O
functions, designed to lower the size of application on small systems
with size constraint issues.
I am guessing that this affects program space (ROM/flash), but not RAM usage, is that correct? I am not using stdio etc, only sprintf and the like.
Regarding the nano version of malloc:
NEWLIB has two implementations of malloc family's functions, one in
`mallocr.c' and the other one in `nano-mallocr.c'. This options
enables the nano-malloc implementation, which is for small systems
with very limited memory.
I am guessing that this affects mainly program space (ROM/flash), but does it need less RAM too? Much less, or a little less?
I have one target with 8 KiB, but another one with more than 80 KiB RAM. Given that the nano malloc currently has memory fragmentation issues, if I
have understood the last, recent discussion about it correctly, I wonder whether the nano malloc makes sense if the target has plenty of ROM/flash
memory, which is the case on my boards.
Thanks in advance,
More information about the Newlib