Porting windows app to OS X and it's extremely huge as a result
Porting windows app to OS X and it's extremely huge as a result
- Subject: Porting windows app to OS X and it's extremely huge as a result
- From: Platon Fomichev <email@hidden>
- Date: Sat, 24 May 2008 14:50:46 +0400
Gentlemen
I am porting a huge Windows application to OS X - I have to keep lots
of code intact and this is a requirement - as a parallel I am also
doing Linux port. The resulting binary is extremely big and can't be
compared to either Win32 and Linux. This is really bad for customers
as size is a critical priority. While investigating I came across
lots of places where memory is allocated on the stack and in huge
numbers f.ex. char test_blob[640000] = {0}; I will not judge the
code, after all it's not mine, but there are lots of such
initializers. I looked at Linux and it seems that there is an option -
fzero-initialized-in-bss which is enabled by default in gcc and which
perfectly works here, i.e. turning it off makes Linux binaries just
the same huge size as on Mac.
So there is question : Is it possible to have zero initialized data
in BSS on OS X. This looks to be a handy issue because there are many
times in my practice when I use small arrays of data with zero
initialization and thinking that they are all now add to the
cumulative size is rather troubling.
If Apple's GCC can be built from sources I even can try to integrate
this option in there just because I think it's useful.
Of course the solution here is to either alloc the blobs or strip {0}
and do a bzero f.ex. later.
Best regards,
Platon Fomichev<email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden