Thanks Michael! I am interested why using printf will make footprint/malloc will make footprint larger? I think they are just some functions from other shared libraries, which will only have a link/address in the module which invokes them -- they are not inline functions. Why using printf and malloc will make footprint larger?
regards, George ----- Original Message ---- From: Michael Eager <[EMAIL PROTECTED]> To: Lin George <[EMAIL PROTECTED]> Sent: Thursday, December 21, 2006 3:47:33 PM Subject: Re: to reduce footprint Lin George wrote: > I am wondering how to reduce the footprint of a binary build (C/C++) program > generated by gcc. This would probably be better sent to the gcc-help mailing list. > 1. Any ideas of reduce the footprint of a debug version build? Debug information generally does not take any memory space. > 2. Any ideas of reduce the footprint of a release version build? There are optimizations, which other people have mentioned. But the best way to have smaller footprint is to have less code. For example, if you are doing simple I/O operations, you might low level I/O routines like getc or puts, rather than much larger functions like printf. Avoiding malloc also reduces footprint. -- Michael Eager [EMAIL PROTECTED] 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
