home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 19106 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.8 KB  |  58 lines

  1. Path: sparky!uunet!gatech!enterpoop.mit.edu!eru.mt.luth.se!kth.se!news.kth.se!d90-awe
  2. From: d90-awe@klara.nada.kth.se (Assar Westerlund)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Parameter passing & data abstraction
  5. Message-ID: <D90-AWE.93Jan1044231@klara.nada.kth.se>
  6. Date: 1 Jan 93 03:42:31 GMT
  7. References: <1992Dec30.184135.1963@organpipe.uug.arizona.edu> <24524@alice.att.com>
  8.     <1993Jan1.002606.13612@organpipe.uug.arizona.edu>
  9. Sender: usenet@kth.se (Usenet)
  10. Organization: Royal Institute of Technology, Stockholm, Sweden
  11. Lines: 43
  12. In-Reply-To: dave@cs.arizona.edu's message of 1 Jan 93 00:26:06 GMT
  13. Nntp-Posting-Host: klara.nada.kth.se
  14.  
  15. In article <1993Jan1.002606.13612@organpipe.uug.arizona.edu> dave@cs.arizona.edu (Dave Schaumann) writes:
  16.  
  17.    In article <24524@alice.att.com>, bs@alice (Bjarne Stroustrup) writes:
  18.    >
  19.    >
  20.    >dave@cs.arizona.edu (Dave Schaumann @ University of Arizona) writes
  21.    >
  22.    > [I complained about the large size executables g++ produces]
  23.    >
  24.    >That cannot be a C++ problem. For
  25.    >
  26.    >    #include <stdio.h>
  27.    >
  28.    >    main() { printf("Hello, World\n"); }
  29.    >
  30.    >I get 
  31.    >
  32.    >    text    data    bss    dec    hex
  33.    >    12288    6144    7624    26056    65c8
  34.    >when compiling as a C++ program, and
  35.    >
  36.    >    text    data    bss    dec    hex
  37.    >    12288    6144    7612    26044    65bc
  38.  
  39.    OK, fair enough.  Here's what I get:
  40.  
  41.    Machine    gcc size    g++ size  (size in bytes)
  42.    -------    --------    --------
  43.    Sequent      18085       23882
  44.    Sun 4        24576      110490(!)
  45.  
  46. Better use size as Bjarne does. libg++ is usually compiled with
  47. debugging-information included, which usually takes place on disk but
  48. not in memory (unless you use a debugger, of course).
  49.  
  50. I get:
  51.  
  52. klara:>size /tmp/test.g{++,cc}
  53. text    data    bss     dec     hex
  54. 8192    8192    0       16384   4000    /tmp/test.g++
  55. 8192    8192    0       16384   4000    /tmp/test.gcc
  56.  
  57. On a sun4 using GCC/G++ 2.3.2.
  58.