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

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

RE: [avr-gcc-list] libc/fdevopen/calloc/malloc (was gcc-3.4.2 bin forwin


From: Bernard Fouché
Subject: RE: [avr-gcc-list] libc/fdevopen/calloc/malloc (was gcc-3.4.2 bin forwin xp?)
Date: Mon, 8 Nov 2004 18:09:42 +0100

I would drop all memory reservation in such a function: for instance you can
just have one UART that you wish to print on (really common case for
development) and you don't need to waste 2 _iob hence 24 bytes of RAM for
stderr/stdin.

-----Message d'origine-----
De : address@hidden
[mailto:address@hidden la part de Joerg Wunsch
Envoyé : lundi 8 novembre 2004 16:21
À : address@hidden
Objet : Re: [avr-gcc-list] libc/fdevopen/calloc/malloc (was gcc-3.4.2
bin forwin xp?)


Bernard Fouché <address@hidden> wrote:

> - Have something like fdevopenlight() (!) that works like fdevopen
> but without calls to calloc/malloc.

Yeah, I always intented to implement something along that line.
Limited to a fixed set of 3 descriptors (stdin, stdout, stderr), which
probably suffices for most environments.  This would eliminate the need
for malloc, as these three descriptors could use a pre-allocated memory
array.

I simply haven't come around yet to really implement it, and integrate
it into the library.  IMHO, it should be done about the same way as
the scanf/printf customization is done.

--
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list



reply via email to

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