delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/29/03:18:23

Date: Mon, 29 Dec 1997 10:18:19 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Stritt <Stritt AT t-online DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: "big" arrays in GnuC++ V2
In-Reply-To: <m0xmOjX-0004o1C@fwd05.btx.dtag.de>
Message-ID: <Pine.SUN.3.91.971229101801.27720G-100000@is>
MIME-Version: 1.0

On Sun, 28 Dec 1997, Stritt wrote:

> In GnuC++ V1 I never had problems with "big arrays", that means for example 
> 
> "unsigned char BIG[2000000]" -this should allocate an array of ca 2MB.
> 
> But now, whith Version 2 of GnuC++ und Go32-v2 the Compiler compiles
> my program, but when i execute it, it crashes :-(((.

You didn't post enough information to identify the cause of your
problem.  My first guess would be that BIG[] is declared a local
array and is therefore overrunning the stack.  The DJGPP FAQ list
(v2/faq210b.zip from the same place you get DJGPP) explains this
problem and workarounds in section 15.9.

If the advice in the FAQ doesn't help, post here the shortest program
that reproduces the problem.

- Raw text -


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