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]

Re: printf() stops working after some time


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

Attachment: signature.asc
Description: PGP signature


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