Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!psuvax1!news From: melling@cs.psu.edu (Michael D Mellinger) Newsgroups: comp.sys.amiga.advocacy Subject: Re: Peter, can you explain to the Amigoids (was: NeXT software size Message-ID: <486G8ox$1@cs.psu.edu> Date: 8 May 91 03:25:38 GMT References: <11866@uwm.edu> <*05Gx0x&1@cs.psu.edu> <1569@ewu.UUCP> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 31 In-Reply-To: mpierce@ewu.UUCP's message of 7 May 91 04:37:35 GMT Nntp-Posting-Host: sunws5.sys.cs.psu.edu In article <1569@ewu.UUCP> mpierce@ewu.UUCP (Mathew Pierce) writes: Same program, using Manx Aztec C V3.6 producing only object file cc -s test - 120 normal compilation cc test - 5944 Bear in mind that this is an OLD compiler. It probably doesn't matter too much. How much can you optimize "hello world?" Also, when I do cc -s blah.c, I get only object code, what does cc -s -object blah.c do on your compiler? Does that produce only object code too? The reason I ask is that it looks like it does, but I see that your listing shows a.out* for that compilation. -s strips the debugging info, and -object tells the compiler to use a different object file format. On the NeXT, as well as most Unix machines, the program is normally stored in two segments(pages), a data and a text segment(execuatable code). On the NeXT, each the page is 8K, so even small programs will be 16K large(8K text + 8K data). When the a segment becomes larger than 16K it automatically grows to 24K(i.e. It grows by 8K each time). This is done to allow the program to paged(be moved from disk to memory) in faster. -Mike