www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/04/23:47:24

From: Prashant TR <prashant_tr AT yahoo DOT com>
To: MM <mm AT netcom DOT ca>
Subject: Re: Array crashes my program!
Date: Wed, 5 Jan 2000 08:45:02 +0500
X-Mailer: KMail [version 1.0.28]
References: <38729762 DOT 6F966CF7 AT netcom DOT ca>
In-Reply-To: <38729762.6F966CF7@netcom.ca>
Cc: djgpp AT delorie DOT com
MIME-Version: 1.0
Message-Id: <00010508465200.00582@yahoo>
Reply-To: djgpp AT delorie DOT com

On Wed, 05 Jan 2000, MM wrote:

>  int main (void)
> {
>    int array[1000000];
>    return (0);
> }
> 
> continually crashes my program.

Naturally. The array is huge (around 2MB) and you are runnoing out of
stack space. Declare it global. Otherwise, use stubify and change the
size of the stack.

Prashant
---------------------------------------------------
One pound of learning requires ten pounds of common
sense to apply it.

- Raw text -


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