Mail Archives: djgpp/1999/08/08/11:51:44
On Sun, 08 Aug 1999 00:14:25 GMT, Endlisnis <s257m AT unb DOT ca> 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 <stdio.h>
> 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
- Raw text -