delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/25/18:44:01

Message-Id: <199711252341.SAA22121@delorie.com>
From: "sl" <SL AT usemail DOT com>
To: "DJGPP mailing list" <djgpp AT delorie DOT com>,
"George Foot" <mert0407 AT sable DOT ox DOT ac DOT uk>
Date: Tue, 25 Nov 97 18:47:01
Reply-To: "sl" <SL AT usemail DOT com>
MIME-Version: 1.0
Subject: Re: Excessive exe sizes

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 -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019