Re: Static data -- thanks
Re: Static data -- thanks
- Subject: Re: Static data -- thanks
- From: Allan Odgaard <email@hidden>
- Date: Tue, 6 Jul 2004 20:14:51 +0200
On 6. Jul 2004, at 17:31, Eric Dahlman wrote:
Interestingly, the executable is huge (42MB). The same code compiled
with Visual studio produces an executable that is 56KB.
If this is the case then what is happening is that Visual studio is
recognizing that the static data is all zero and not actually placing
it in the executable. [...]
I did some tests with gcc declaring 10 MB of zero-initialized global
data:
1) static char data[10][1024][1024] = { };
2) static char data[10][1024][1024] ;
3) char data[10][1024][1024] = { };
4) char data[10][1024][1024] ;
Declaration 1, 2, and 4 does *not* affect the executable size. But #3
adds 10 MB to my executable.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.