www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/06/28/13:15:37

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: DJGPP AT sun DOT soe DOT clarkson DOT edu
Date: Wed, 28 Jun 1995 11:46:53 BST
Subject: Size of a.out

C++ program             A.OUT size unstripped    A.OUT size stripped
int x[10000]; main(){}  52269                    44140
main(){}                15387                     7276
   (difference)         36882                    36864

  Why does declaring the array `x' add so much size to A.OUT? Surely there is
a more compact way of telling the loader to set the next 40000 bytes of RAM to
all zeros, than to write out 40000 zeros at length in the .EXE file? Long ago
in the CDC7600 mainframe's equivalent of .EXE files, there was a special
compact notation for "repeat the next n bytes p times". Why not in PC's? (I
know that the A.OUT from `int x[10000]; main(){}' contains 40000 consecutive
ascii-zeros that aren't in the A.OUT from `main(){}': I just looked!)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019