www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/16/22:24:51

Message-Id: <199609170209.TAA03278@bluesky.com>
Comments: Authenticated sender is <kbaca AT bluesky DOT skygames DOT com>
From: "Kevin Baca" <kbaca AT skygames DOT com>
To: djgpp AT delorie DOT com
Date: Mon, 16 Sep 1996 19:12:19 +0000
MIME-Version: 1.0
Subject: Re: Possible static data zeroisation bug in DJGPP v2?

> > >You must forgive me for my disbelief, but how can an "external" variable
> > >be initialized at all?  It's initialized elsewhere,  where it is
> > >defined, not declared (externally declared or not...)
>  
> > Have you heard about a piece of code that runs BEFORE the very fisrt line of
> > your program runs (in DJGPP is in crt0.o...) the C Run Time start up code?
>  
> > One of its functions is precisely to do this chore.
> 
> Correct me if I'm wrong, but wasn't this changed so that it _did not_ zero
> the code for performance reasons? (I actually think this was part of Quake
> ie: id needed some more performance, so taking out the zeroing of allocated
> memory was used to help speed things up a bit). I think you now specify that
> you want it zeroed as part of the __crt0_startup_flags (I cant verify this,
> I have never needed to test it)

That only applies to dynamic memory (e.g. memory allocated with 
malloc).

-Kevin 

- Raw text -


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