www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/06/07:17:18

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Wed, 6 Feb 2002 14:15:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Damon Hastings <damonhastings AT yahoo DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Help! Can't allocate 512KB static array??
In-Reply-To: <76c7896d.0202060135.4fbf94e9@posting.google.com>
Message-ID: <Pine.SUN.3.91.1020206140859.3481E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 6 Feb 2002, Damon Hastings wrote:

> And it would be *nice* if I got a compile-time error instead
> of spontaneous reboots

Unfortunately, this is impossible: there's no way the compiler could tell 
what would be the max stack limit of the binary, since (as the FAQ 
explains in section 15.9) the run-time stack limit can be changed by 
running the stubedit utility on the executable program.

As for reboots, preventing them is a very hard problem, given the 
limitations of the DPMI spec.  One solution was tried in the past, but it 
had so many adverse side effects that it was abandoned.

With the 512KB default limit, this problem only haunts newcomers who 
don't read the docs and at the same time define preposterously large 
automatic arrays.  This combination turns out to be so rare that I 
haven't seen such complaints for months, if not years.

- Raw text -


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