* Big executable program size
@ 2005-09-19 1:47 fracttcarf
2005-09-19 2:16 ` John B. Matthews
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: fracttcarf @ 2005-09-19 1:47 UTC (permalink / raw)
I downloaded gnat-gpl-2005-pentium-mingw32msv-bin.exe for win98
and compiled hello.adb
This hello.exe size is 1520kb. why?
My english is poor. ㅜㅜ
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Big executable program size
2005-09-19 1:47 Big executable program size fracttcarf
@ 2005-09-19 2:16 ` John B. Matthews
2005-09-19 15:42 ` Jeffrey Carter
2005-09-19 17:44 ` Martin Krischik
2 siblings, 0 replies; 5+ messages in thread
From: John B. Matthews @ 2005-09-19 2:16 UTC (permalink / raw)
In article <1127094422.059661.244550@f14g2000cwb.googlegroups.com>,
fracttcarf@yahoo.co.kr wrote:
> I downloaded gnat-gpl-2005-pentium-mingw32msv-bin.exe for win98
> and compiled hello.adb
> This hello.exe size is 1520kb. why?
Extensive & informative discussions on this topic may be found by
searching Google Groups:
<http://groups.google.com/groups?q=hello+program+size+group%3Acomp.lang.a
da>
> My english is poor.
You can narrow the search to by language, too:
<http://groups.google.com/advanced_search>
--
John
jmatthews at wright dot edu
www dot wright dot edu/~john.matthews/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Big executable program size
2005-09-19 1:47 Big executable program size fracttcarf
2005-09-19 2:16 ` John B. Matthews
@ 2005-09-19 15:42 ` Jeffrey Carter
2005-09-19 18:25 ` tmoran
2005-09-19 17:44 ` Martin Krischik
2 siblings, 1 reply; 5+ messages in thread
From: Jeffrey Carter @ 2005-09-19 15:42 UTC (permalink / raw)
fracttcarf@yahoo.co.kr wrote:
> I downloaded gnat-gpl-2005-pentium-mingw32msv-bin.exe for win98
> and compiled hello.adb
> This hello.exe size is 1520kb. why?
The simple answer is that your program has statically linked in a lot of
stuff it doesn't use. You could look at gnatelim if you're interested in
how much of that is really needed.
A longer answer points out that much of the excess is relatively fixed,
and is not a significant proportion of a "real" program, where it's also
more likely to be needed.
--
Jeffrey Carter
"Now go away or I shall taunt you a second time."
Monty Python and the Holy Grail
E-mail: jeffrey_r_carter-nr [commercial-at]
raytheon [period | full stop] com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Big executable program size
2005-09-19 1:47 Big executable program size fracttcarf
2005-09-19 2:16 ` John B. Matthews
2005-09-19 15:42 ` Jeffrey Carter
@ 2005-09-19 17:44 ` Martin Krischik
2 siblings, 0 replies; 5+ messages in thread
From: Martin Krischik @ 2005-09-19 17:44 UTC (permalink / raw)
fracttcarf@yahoo.co.kr wrote:
> I downloaded gnat-gpl-2005-pentium-mingw32msv-bin.exe for win98
> and compiled hello.adb
> This hello.exe size is 1520kb. why?
Here a few hello world programs from the Wikibook Ada Programming:
1,1M ./Windows_NT-i686-Debug/hello_world_2.exe
1,1M ./Windows_NT-i686-Debug/hello_world_3.exe
1,1M ./Windows_NT-i686-Debug/hello_world_1.exe
16K ./Linux-x86_64-Release/hello_world_1
16K ./Linux-x86_64-Release/hello_world_2
16K ./Linux-x86_64-Release/hello_world_3
36K ./Linux-i686-Debug/hello_world_2
36K ./Linux-i686-Debug/hello_world_3
36K ./Linux-i686-Debug/hello_world_1
12K ./Linux-i686-Release/hello_world_1
12K ./Linux-i686-Release/hello_world_2
12K ./Linux-i686-Release/hello_world_3
40K ./Linux-x86_64-Debug/hello_world_1
40K ./Linux-x86_64-Debug/hello_world_2
40K ./Linux-x86_64-Debug/hello_world_3
20K ./Windows_NT-i686-Release/hello_world_2.exe
20K ./Windows_NT-i686-Release/hello_world_3.exe
20K ./Windows_NT-i686-Release/hello_world_1.exe
You see there are significant variation here - the smallest is 12K the
largest 1.1M. Perhaps you might want to have a look how we set up the
project files.
Martin
Links:
http://en.wikibooks.org/wiki/Ada_Programming/Basic
https://sourceforge.net/project/showfiles.php?group_id=124904
http://cvs.sourceforge.net/viewcvs.py/wikibook-ada/demos/GNAT/wikibook_ada.gpr?view=markup
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Big executable program size
2005-09-19 15:42 ` Jeffrey Carter
@ 2005-09-19 18:25 ` tmoran
0 siblings, 0 replies; 5+ messages in thread
From: tmoran @ 2005-09-19 18:25 UTC (permalink / raw)
>> I downloaded gnat-gpl-2005-pentium-mingw32msv-bin.exe for win98
>> and compiled hello.adb
>> This hello.exe size is 1520kb. why?
>The simple answer is that your program has statically linked in a lot of
>...
>A longer answer points out that much of the excess is relatively fixed,
>and is not a significant proportion of a "real" program, where it's also
>more likely to be needed.
Also, different Ada compilers generate substantially different exe sizes,
presumably depending on how their designers view the cost of
disk/RAM/bandwidth vs the cost of trimming out the fat.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-09-19 18:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-19 1:47 Big executable program size fracttcarf
2005-09-19 2:16 ` John B. Matthews
2005-09-19 15:42 ` Jeffrey Carter
2005-09-19 18:25 ` tmoran
2005-09-19 17:44 ` Martin Krischik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox