This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

RE: stdio vs. diag_printf



On 11-Jul-2000 Grant Edwards wrote:
> 
> Hi all,
> 
> I'm looking for ways to trim memory usage and am trying to
> figure out how much of the stdio stuff I really need.  All I
> really want is unbuffered output to the diagnostic port
> supporting non-floating point "printf" formats.
> 
> Right now, debugging stuff is a mixture of printf() and
> diag_printf().  If I change all of the debugging stuff to
> diag_printf, can I loose some more library stuff?
> 
> IOW, does diag_printf require the stdio package?  If not, I
> think this would, in turn, allow me to get rid of malloc() and
> its associated heap and posssibly some other stuff.
> 

'diag_printf()' does not use any of the [standard] C library stuff.
In fact, you can use it with only the HAL enabled and no other packages.

Yes, taking out your use of "printf()" and friends can provide a 
significant memory savings.

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