help-make
[Top][All Lists]
Advanced

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

Re: to reduce footprint


From: Lin George
Subject: Re: to reduce footprint
Date: Thu, 21 Dec 2006 09:10:01 -0800 (PST)

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 <address@hidden>
To: Lin George <address@hidden>
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     address@hidden
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




reply via email to

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