www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/18/05:21:21

Date: Thu, 18 Apr 1996 12:10:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: GEORGE GAGHON <gaghon AT nevada DOT edu>
Cc: djgpp AT delorie DOT com
Subject: Re: static variables
In-Reply-To: <4l2962$68b@news.nevada.edu>
Message-Id: <Pine.SUN.3.91.960418120658.10058G-100000@is>
Mime-Version: 1.0

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.)

- Raw text -


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