From: "Tony O'Bryan" Newsgroups: comp.os.msdos.djgpp Subject: Re: Large global arrays in C++ Date: Mon, 24 Nov 1997 16:25:49 -0600 Organization: Southwest Missouri State University Lines: 20 Message-ID: <3479FEED.4485@nic.smsu.edu> References: Reply-To: aho450s AT nic DOT smsu DOT edu NNTP-Posting-Host: sara.a33.smsu.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Eli Zaretskii wrote: > Are you sure you need to compile that game as a C++ program? This > feature only exists for C++ programs, so you can avoid it by compiling > it as C. That's not entirely true. A global array in C that is not auto-intialized does not consume extra disk space. An auto-initialized global array does get written to disk in its entirety. Here is an example: char LargeGlobalArray[1000000] = {0}; int main(void) { return 0; } Compiled with "gcc -c test.c", the compiler produces an executable that is 1,000,455 bytes.