Mail Archives: djgpp/1997/11/25/18:44:01
On 25 Nov 1997 05:14:03 GMT, George Foot wrote:
>Shouldn't it? I'm afraid it does, under some circumstances. That's
>what this whole thread is about...
>
>* If the array is initialised (even only in part), it *has* to be
>stored in the .exe file -- where else will it get the initialisation
>data?
>
>* In C++ all static arrays (initialised or not) are stored in the
>executable file in full.
I understand what you mean but unless you specifically declared what values are to be stored in the
static array isn't it plain dumb to store a bunch of zeros (when you know ahead of time the array hasn't been
initialized) in the EXE? I figure it should be VERY easy to optimize this kind of garbage out of an EXE.
Gili
- Raw text -