public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: "R. Diez" <rdiezmail-newlib@yahoo.de>
To: newlib@sourceware.org
Subject: Type of memory advantage of the nano printf and malloc versions
Date: Thu, 13 May 2021 18:54:00 +0200	[thread overview]
Message-ID: <8a88e559-1d60-d9cb-56e5-ab21cf8ecb2d@yahoo.de> (raw)
In-Reply-To: <8a88e559-1d60-d9cb-56e5-ab21cf8ecb2d.ref@yahoo.de>

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

           reply	other threads:[~2021-05-13 16:54 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <8a88e559-1d60-d9cb-56e5-ab21cf8ecb2d.ref@yahoo.de>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a88e559-1d60-d9cb-56e5-ab21cf8ecb2d@yahoo.de \
    --to=rdiezmail-newlib@yahoo.de \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).