Newsgroups: comp.sys.amiga.advocacy
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!news.cs.indiana.edu!cica!travis!greg
From: greg@travis.cica.indiana.edu (Gregory TRAVIS)
Subject: Re: Peter, can you explain to the Amigoids (was: NeXT software size
Message-ID: <greg.673585288@travis>
Sender: news@cica.indiana.edu (News System)
Nntp-Posting-Host: travis.cica.indiana.edu
Organization: Indiana University
References: <*05Gx0x&1@cs.psu.edu> <11877@uwm.edu> <xn8Gty-&1@cs.psu.edu>
Date:  7 May 91 03:01:28 GMT

In <xn8Gty-&1@cs.psu.edu> melling@cs.psu.edu (Michael D Mellinger) writes:


>In article <11877@uwm.edu> gblock@csd4.csd.uwm.edu (Gregory R Block) writes:


>   > -rwxr-xr-x  1 melling  wheel      16384 May  6 18:13 a.out*

>   That does tell me quite a bit.  16k to simply say "Hello, World".  Oh,
>   boy.  That's advanced.  Even the A3000UX compiles it at something like
>   1100 bytes.  Maybe your programs could be a little slimmer.  Or maybe
>   it's just the NeXT problem in your list of many.

>Ok idiot.  I gave two examples.  One was only 1300 bytes, and it was
>the *same* program.  Get someone else to explain why the program is
>16K.  I'll get you a hint.  Internal fragmantation.

Just to add a data point.  Mach, by default, will try and seperate
the different parts of an executable (text/bss/static) into individual
partitions.  By giving the loader argument "-object" all the components of
a program will be lumped together into one (unsharable) segment.  That
is, all the components save the shared libraries.  A "size a.out" for
my version of "Hello, world" gives:

size a.out
_TEXT  __DATA  __OBJC  others  dec     hex
503     16      0       0       519     207

519 bytes isn't too bad for "Hello, world."  Ls'ing the executable is
much less reliable than "size"ing it due to file system padding and
other artifacts such as symbol tables, etc.

greg
--
Gregory R. Travis                Indiana University, Bloomington IN 47405
greg@cica.indiana.edu  		 Center for Innovative Computer Applications
Not an offical pinko of CICA or Indiana University
