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 Mon, Jul 10, 2000 at 04:06:19PM -0600, Gary Thomas wrote:

> > 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.

Cool. I've got to make room for SNMP support.  HTTP support is
also in the works, but I've already told the hardware guys
they've got to double the amount of memory for that. :)

Unfortunately, lack of printf() breaks a some tests and some
networking stuff, but that's easy enough to fix.  I'll have to
look up the gnu cpp extensions to see if there's a way to do

#define define printf(vararg_list) daig_printf(vararg_list)

I seem to recall that it's possible but the syntax escapes me
at the moment...

-- 
Grant Edwards
grante@visi.com

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