From: horst DOT kraemer AT snafu DOT de (Horst Kraemer) Newsgroups: comp.os.msdos.djgpp Subject: Re: A bug Date: Sun, 08 Aug 1999 10:04:51 GMT Organization: [Posted via] Interactive Networx Lines: 34 Message-ID: <37ad3db7.77357439@news.snafu.de> References: <37A9CB8A DOT EEC86F96 AT americasm01 DOT nt DOT com> <37AC70EA DOT 1CEA579E AT cartsys DOT com> <37ACCB8F DOT 30CF0863 AT unb DOT ca> NNTP-Posting-Host: n242-180.berlin.snafu.de X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sun, 08 Aug 1999 00:14:25 GMT, Endlisnis wrote: > > > I was probably wrong about that specific issue (the 80k), but in the > > > past, I've had problems with very large global static arrays (several Megs). > > If you can still reproduce them, perhaps you could report it so we can > > see if a real problem underlies it. > Well, I can't seem to recreate it, so it was probably my imagination, but I > did notice that static array values are loaded from the executable, which makes > this program over 40Megs as an executable: > > ------------------ > #include > int a[10000000]; > > int main(int argc, char *argv[]) > { > printf("size = %d", sizeof(a)); > return 0; > } On my system test.exe is ( gcc -s test.c -o test.exe) DJGPP/gcc 2.8.1 : 46080 bytes mingw32/gcc 2.95 (release) 3072 bytes There may not be enough memory to execute the program, but the 10 million 0-ints are not loaded from file. Regards Horst