🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1587

Re: Abnormal .EXE size with Turbo C 2.0

#1587
From: David Hinds
Date: Mon, 16 Jul 1990 05:05
12 lines
1164 bytes
This is simply a "feature" of the C language.  Static/global variables
are automatically initialized to 0.  Initialized variables all occupy
space in an EXE file.  So, a 32K global variable increases the EXE file
size by 32K of zeros.  If you can't debug a program this big (?!?), you
are in trouble, because it doesn't matter whether or not the EXE file
includes all this space.  The program will need the same amount of space
however you declare the buffer; if it is an automatic variable it will
simply be allocated at runtime.  55K doesn't seem like much of a program:
are you really short on RAM or something?

-David Hinds
  dhinds@popserver.stanford.edu
Technical Details
Message-ID: <1990Jul16.050505.173@portia.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!snorkelwacker!usc!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!riacs!shelby!portia.stanford.edu!dhinds
References: <50987@iuvax.cs.indiana.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!snorkelwacker!usc!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!riacs!shelby!portia.stanford.edu!dhinds
From: dhinds@portia.Stanford.EDU (David Hinds)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Abnormal .EXE size with Turbo C 2.0
Message-ID: <1990Jul16.050505.173@portia.Stanford.EDU>
Date: 16 Jul 90 05:05:05 GMT
References: <50987@iuvax.cs.indiana.edu>
Distribution: comp
Organization: AIR, Stanford University
Lines: 12