public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Type of memory advantage of the nano printf and malloc versions
       [not found] <8a88e559-1d60-d9cb-56e5-ab21cf8ecb2d.ref@yahoo.de>
@ 2021-05-13 16:54 ` R. Diez
  0 siblings, 0 replies; only message in thread
From: R. Diez @ 2021-05-13 16:54 UTC (permalink / raw)
  To: newlib

Hi all:

Regarding the nano version of printf etc:

----8<----8<----8<----
-enable-newlib-nano-formatted-io

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.
----8<----8<----8<----

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:

----8<----8<----8<----
--enable-newlib-nano-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.
----8<----8<----8<----

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,
   rdiez

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-13 16:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <8a88e559-1d60-d9cb-56e5-ab21cf8ecb2d.ref@yahoo.de>
2021-05-13 16:54 ` Type of memory advantage of the nano printf and malloc versions R. Diez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).