avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] fdevopen() uses calloc?


From: E. Weddington
Subject: Re: [avr-gcc-list] fdevopen() uses calloc?
Date: Wed, 21 Jan 2004 09:15:14 -0700

On 21 Jan 2004 at 16:06, Joerg Wunsch wrote:

> "J.C. Wren" <address@hidden> wrote:
> 
> > fdevopen() is using calloc(), which pulls in a lot of extra code.
> > Is there any reason this couldn't use a static, instead?
> 
> It's been on my medium-priority todo list for some time to provide an
> fdevopen() implementation that can handle only stdin/stdout/ stderr,
> but has the struct __file for them pre-defined.
> 
> OTOH, it's probably of only limited use.  Anyone who's going to use
> printf() is certainly running a larger device than an ATmega2313 ;-),
> and perhaps is using malloc() already anyway.  

Perhaps not so.

I could easily see using printf, limited to those available streams, but not 
wanting to include malloc.

The main reason why I don't use printf *is* because it uses malloc and I don't 
want to get into that.

Eric


reply via email to

[Prev in Thread] Current Thread [Next in Thread]