delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/07/02:04:40

Date: Tue, 7 Jan 1997 08:51:55 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Arash <ei39594 AT ios DOT chalmers DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: How can I reduce the compiled executable size?
In-Reply-To: <32CF7FC6.F78@ios.chalmers.se>
Message-ID: <Pine.SUN.3.91.970107084724.26754H-100000@is>
MIME-Version: 1.0

On Sun, 5 Jan 1997, Arash wrote:

> > Now, it I compare the file sizes of with.exe and without.exe, 
> >  1-04-97  22:46         100,205  with.exe
> >  1-04-97  22:47          61,446  without.exe
> 
> Hmmm ....a wild guess is that DJGPP makes the function inline and then 
> unrulls the loop, (make five copies of gotoxy()) but does it make the 
> executable 40Kb larger???

GCC cannot inline a function which is taken from the library.  It *must* 
see the function's source code when it inlines (if you think about it for 
a second, you will realize that it cannot be any other way, since 
inlining is done by the *compiler*, not the *linker*).

> I assume that DJGPP's version of gotoxy() is a very complex function 
> (????) but it should NOT be inline if it's so big!

No, it just is a part of a single large source file which holds all the 
conio functions together, and all of them are thus linked in.

> BTW, the whole conio will not be linked to your exe-file.

Yes, it will, since it is a single source module.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019