This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Giant executables.. what am I doing wrong?


On Tue, Oct 15, 2002 at 06:58:12AM -0400, Steve Dondley wrote:
> > I'm currently trying to write a program for a linux system with limited
> > memory, and as such I'd like gcc to generate small, statically linked
> > executables.
> 
> As someone new to C, I'm a little confused by the above.
> According to GNU C tutorial I'm reading, using static 
> libraries INCREASES the amount of memory used.

And for a normal system, that is correct. On a normal desktop or server
system, many processes will run at the same time. If a number of those
processes make use of the printf() function at one point in time, it makes
sense to share the function between those processes.
  However, the system I'm building will probably run 3 or 4 processes on
average, each of which will use only a small subset of the c library. As
I'm limited in memory, I simply can't afford the (otherwise perfectly
acceptable) overhead shared libraries impose.

-- 
		-- Michiel


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