Date: Sun, 30 May 1999 12:21:11 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Brian Ronk cc: djgpp AT delorie DOT com Subject: Re: errors In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sat, 29 May 1999, Brian Ronk wrote: > I have been recieving an error that I am assuming is a memory error. > My program starts up, but never actually runs anything. It quits > with a 255 code, with a message about SIGSEGV. I found out what in > my program was causing the error. I declared an array of size 50 of > a type that was about 230444 bytes large. (it is a map class if you > are wondering) I figured out that this won't work on my computer > since that needs about 11 megs of memory Is the array automatic? In other words, is it declared inside one of the functions? If so, then you are trashing the run-time stack, which is by default 512KB and cannot be enlarged after the program starts. See section 15.9 of the FAQ for more details. Generally, for such large arrays, it is a bad idea to declare them automatic. Instead, allocate the storage at run time using `malloc'. Then you have all the virtual memory at your disposal.