Date: Sun, 3 Jan 1999 11:07:13 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Roger Lindström cc: djgpp AT delorie DOT com Subject: Re: program crash In-Reply-To: <368e3f41.0@d2o30.telia.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id EAA25024 Reply-To: djgpp AT delorie DOT com On Sat, 2 Jan 1999, Roger Lindström wrote: > Help!! My program crashes if antal ( look at row **** This one ****) is over > 12000. Can someone tell me wahts wrong. [...] > #define antal 1000 // **** This one **** > Star lista[antal]; This is in the FAQ (section 15.9). You are defining a local array. Memory for such ararys is allocated off the stack. DJGPP programs have by default a 256KB stack. However, in your case, "sizeof(Star)" is something like 40 bytes, so 12000 of Star objects sum up to 480000 bytes, and that blows up the default stack. See section 15.9 of the FAQ for solutions.