Date: Thu, 18 Apr 1996 12:10:06 +0200 (IST) From: Eli Zaretskii To: GEORGE GAGHON Cc: djgpp AT delorie DOT com Subject: Re: static variables In-Reply-To: <4l2962$68b@news.nevada.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 17 Apr 1996, GEORGE GAGHON wrote: > I have a silly question. In the DJGPP compiler there is a 256k stack for > AUTO arrays and vars. How is a STATIC variable different from a AUTO > variable, and where is it stored? They are stored in either the .data or .bss section of the executable, depending on whether they were or weren't initialized. These sections aren't limited in size. The fixed stack limit is a mis-feature of the DPMI specification. All together now: ``Thanks, Bill!'' (Btw, I hope you know that the 256k is only a default that can be changed; see the FAQ for details.)