printf() stops working after some time
Keith Packard
keithp@keithp.com
Tue Oct 23 17:14:00 GMT 2018
Josef Wolf <jw@raven.inka.de> writes:
> PS: As I investigated the above issue, I've seen that printf() and friends are
> using malloc/realloc and things. I'm getting pretty nervous about malloc
> usage, since this is an embedded system which is supposed to run for
> really long term (years/decades) and fragmentation would be a major issue.
I had similar concerns, along with concerns about large RAM requirements
and have replaced the whole stdio section of newlib with one from the
GCC AVR project which does no dynamic memory allocation and uses only a
few bytes of RAM for a bit of state.
https://salsa.debian.org/electronics-team/toolchains/newlib-nano
> Is it possible to disable malloc usage when compiling newlib?
Yes, using the above version.
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20181023/5d965e1f/attachment.sig>
More information about the Newlib
mailing list