• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Static data -- thanks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.



References: 
 >Re: Static data -- thanks (From: "Christopher Beck" <email@hidden>)
 >Re: Static data -- thanks (From: Eric Dahlman <email@hidden>)

  • Prev by Date: Re: Static data -- thanks
  • Next by Date: Re: Static data -- thanks
  • Previous by thread: Re: Static data -- thanks
  • Next by thread: Re: Static data -- thanks
  • Index(es):
    • Date
    • Thread