home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!enterpoop.mit.edu!eru.mt.luth.se!kth.se!news.kth.se!d90-awe
- From: d90-awe@klara.nada.kth.se (Assar Westerlund)
- Newsgroups: comp.lang.c
- Subject: Re: Parameter passing & data abstraction
- Message-ID: <D90-AWE.93Jan1044231@klara.nada.kth.se>
- Date: 1 Jan 93 03:42:31 GMT
- References: <1992Dec30.184135.1963@organpipe.uug.arizona.edu> <24524@alice.att.com>
- <1993Jan1.002606.13612@organpipe.uug.arizona.edu>
- Sender: usenet@kth.se (Usenet)
- Organization: Royal Institute of Technology, Stockholm, Sweden
- Lines: 43
- In-Reply-To: dave@cs.arizona.edu's message of 1 Jan 93 00:26:06 GMT
- Nntp-Posting-Host: klara.nada.kth.se
-
- In article <1993Jan1.002606.13612@organpipe.uug.arizona.edu> dave@cs.arizona.edu (Dave Schaumann) writes:
-
- In article <24524@alice.att.com>, bs@alice (Bjarne Stroustrup) writes:
- >
- >
- >dave@cs.arizona.edu (Dave Schaumann @ University of Arizona) writes
- >
- > [I complained about the large size executables g++ produces]
- >
- >That cannot be a C++ problem. For
- >
- > #include <stdio.h>
- >
- > main() { printf("Hello, World\n"); }
- >
- >I get
- >
- > text data bss dec hex
- > 12288 6144 7624 26056 65c8
- >when compiling as a C++ program, and
- >
- > text data bss dec hex
- > 12288 6144 7612 26044 65bc
-
- OK, fair enough. Here's what I get:
-
- Machine gcc size g++ size (size in bytes)
- ------- -------- --------
- Sequent 18085 23882
- Sun 4 24576 110490(!)
-
- Better use size as Bjarne does. libg++ is usually compiled with
- debugging-information included, which usually takes place on disk but
- not in memory (unless you use a debugger, of course).
-
- I get:
-
- klara:>size /tmp/test.g{++,cc}
- text data bss dec hex
- 8192 8192 0 16384 4000 /tmp/test.g++
- 8192 8192 0 16384 4000 /tmp/test.gcc
-
- On a sun4 using GCC/G++ 2.3.2.
-