Date: Wed, 28 Jun 1995 18:36:13 +0300 From: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) To: A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk Subject: Re: Size of a.out Cc: DJGPP AT sun DOT soe DOT clarkson DOT edu > 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 This has popped up some time ago. As far as I remember, this is a genuine GCC (mis)feature, not something specific to DJGPP, and it only happens if the above is compiled as C++ code; if you compile it as C program, you get what you expect. I don't know if GCC 2.7 corrected this. Caveat: my memory sucks when such subtle details are involved, and I don't really work in C++ anyway, but you can use the search engine at DJGPP Web server to find the relevant thread in the mailing list archives, at this URL: http://www.delorie.com/djgpp/mail-archives/