delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/23/22:31:31

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Excessive exe sizes
Date: 23 Nov 1997 03:05:10 -0500
Organization: The National Capital FreeNet
Lines: 10
Sender: ao950 AT FreeNet DOT Carleton DOT CA
Message-ID: <658o3m$kc4@freenet-news.carleton.ca>
References: <01bcf777$71921820$56f682c1 AT nicland>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Because it's allocated at compile time in the data area of the .exe!

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.
-- 
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


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