Date: Tue, 25 Nov 1997 14:14:10 +0200 (IST) From: Eli Zaretskii To: sl cc: DJGPP mailing list , Paul Derbyshire Subject: Re: Excessive exe sizes In-Reply-To: <199711250232.VAA28286@delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 24 Nov 1997, sl wrote: > >If you allocate the array dynamically at run-time at the start of main() > >then you will have a reasonable .exe size and equivalent function. > > That is the dumbest thing I have ever heard. ^^^^^^^ Please refrain from calling replies posted by others as ``dumb''. People who offer free help here don't deserve it, even if they are dead wrong. It is okay to correct somebody's message, but flaming them for offering help is something we should try to avoid. > You are allocating MEMORY here, not diskspace! Nevertheless, Paul's suggestion *does* make sense: by switching from statically allocated array to one that's allocated at run time, the disk image doesn't get bloated by the initialized array. > Regardless of if you allocate the array staticly or dynamically it > should NOT use up diskspace! This cannot be done in all cases. For example, if the array is initialized by values other than zeroes, the linker has no other way than to write all those values into the disk .exe file.