At 09:37 PM 8/22/01 -0400, Sean wrote:
I just compiled the C hello world program under
Linux 2.2.12 with
egcs-2.91.66 and got the following:
-rwxrwxr-x 1 spc spc 932131 Aug 22 21:32 hello
Okay, granted, I compiled it statically (if I compiled normally, it would
be 11,811 bytes in size 8-) but still, nearly a megabyte there!
So what's your point? How much memory do you have on this machine? What
fraction of main memory is 932,131 bytes? Given dynamic linking, what
fraction is 11,811 bytes? The PC tools live on big memory machines, there
is no motivation to make them small. On my 68HC11 cross compilation system
compiling hello.c gives me 210 bytes. If it gave me 11K bytes I'd throw it
out because the most I can work with is 64K and 11K is too much to spend on
printing a string.
Here's another test (which is actually useful.) compare the difference between
main() {
printf("Hello World.\n");
}
and
main() {
printf("Hello World.\n");
}
or even more importantly
main() {}
What is the incremental cost of computation once you get into the game?
--Chuck