Mail Archives: djgpp/2000/04/19/03:55:04
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 -