This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: printf() stops working after some time
On 10/23/2018 01:11 PM, Keith Packard wrote:
>> 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.
This is wonderful. Has this been/will this be integrated into the
standard newlib releases?
-Dave
--
Dave McGuire, AK4HZ
New Kensington, PA