delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/05/06:52:40

Date: Wed, 5 Jan 2000 11:16:42 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: leon <Leon AT caresystems DOT com DOT au>
cc: djgpp AT delorie DOT com
Subject: Re: Array crashes my program!
In-Reply-To: <3872B826.B7C010E@caresystems.com.au>
Message-ID: <Pine.SUN.3.91.1000105111216.7920b-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 5 Jan 2000, leon wrote:

> Now in modern systems (well
> ala win95) i don't think it is an issue as every program works in virtual
> space - but since we are tralking about comiling dos programs

This issue has nothing to do with DJGPP programs being DOS programs.  
Almost every modern environment has some limitation on the stack size.  
It is true that most of other environments put the limitation higher than 
DJGPP does, but typically, it is unwise to use up more than, say, 2MB of 
stack space, in any environment.

DJGPP uses a smaller stack by default because, due to limitations of the 
DPMI spec, the stack must be allocated all at once during startup, and it 
isn't nice to eat up several MBs of the address space just for those rare 
cases that want to define humongous local arrays...

FWIW, the absolute majority of ``normal'' programs use much less than 
256KB of stack.

- Raw text -


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