Date: Tue, 2 Apr 1996 14:43:07 +0200 (IST) From: Eli Zaretskii To: Anthony Eguerre Cc: delorie Subject: Re: GCC v2 In-Reply-To: <3160F7B6.2BC7@clermont.inra.fr> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 2 Apr 1996, Anthony Eguerre wrote: > An Other: > main() > {int t[800][800]; > int i,j; > for(j=0;j!=800;j++) > for(i=0;i!=800;i++) > t[j][i]=rand(); > } > result: Stack Fault... > The GCC v2 dont like to big variables. Please read the DJGPP FAQ list (v2/faq200b.zip from the same place you got DJGPP). It explains in section 15.8 that DJGPP programs by default have a 256KByte-long stack. Your program defines a variable that takes 800x800x4 = 2.56MBytes of stack, i.e. 10 times that much. To use such large automatic variables, you should change the default stack size as explained in the FAQ. A simpler solution would be to declare t[][] outside `main', which will make it static.