delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/19/03:55:04

Date: Wed, 19 Apr 2000 09:46:22 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Litmus Dragon <litmusdragon AT mailcity DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Couple of problems using DJGPP/Allegro
In-Reply-To: <8F19D63AAmehomenet@207.126.101.100>
Message-ID: <Pine.SUN.3.91.1000419094605.10023J-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 Tue, 18 Apr 2000, Litmus Dragon wrote:

> The first is with a program that I've made called Dragon Engine.  It's both 
> a role playing game engine and an editor.  About three months ago I added a 
> VERY large set of arrays to the program (defined as int 
> roomtile[5000][13][13], int roomtile[5000][13][13], and some more).  The 
> program compiled and ran fine, everything seemed to be ok, but soon I saw 
> that variables were not holding their values.  Variables which were NOT 
> zero, were returning 0 as their value.  Memory seemed to have been 
> corrupted.

If these arrays and other variables are automatic (i.e. declared
inside some function), it's possible you are overflowing the run-time
stack.  DJGPP programs have by default a 512KB stack (the large arrays
above are 4 times that many bytes), but that can be enlarged using the
STUBEDIT utility.

See section 15.9 of the DJGPP FAQ list for more details about this.

- Raw text -


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