www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/11/21/18:24:07

Subject: Re: HUGE exe
To: ucf-cs!max.tiac.net!OKRA AT alfred DOT oau DOT org (Kimby)
Date: Mon, 21 Nov 1994 09:29:44 -0500 (EST)
From: "Bill Perkins" <billp AT datamax DOT oau DOT org>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

>   Want to see a BIG program?  Here it is:
> 
> char Map[256][512];
> 
> int main() {
> 
>   memset(CellMap,0,sizeof(CellMap));
> }
> 
> 
>   The exe it makes is about 156k.  Anybody know how to tell memset that I 
> really want it to run at RUN TIME?  It "optimizes" itself even with 
> optimizations off.
> 								Kim
You could try malloc'ing the array at run time, instead of declaring it
in the source file; apparently, the memory for the array is being allocated,
initialized, and saved at compile time.
		Regards,
		Bill


- Raw text -


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