Mail Archives: djgpp/1996/09/16/22:24:51
> > >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 -