Date: Thu, 20 May 1999 09:59:47 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Dr. =?iso-8859-1?Q?S=F3lyom=20Andr=E1s?=" cc: djgpp AT delorie DOT com Subject: Re: Program runs with V2.01 and crashes with V2.02 Any ideas? In-Reply-To: <3742A1A3.5363151C@eik.bme.hu> 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 Wed, 19 May 1999, Dr. =?iso-8859-1?Q?S=F3lyom=20Andr=E1s?= wrote: > and recompiled the program with DJGPP version 2.02. When run the program > consumes all available memory then crashes (yes I check every allocation for > success...). Is the fact that it consumes lots or all of the memory considered to be normal behavior for this program in this case? > As a last resort I dug up the 'old' 2.01 DJGPP package and recompiled the > program with it. It now runs without problems again. As others have told you, all too often this is a sign of bugs in dealing with allocated memory, which the v2.01 version let go undetected, because in v2.01 each allocated chunk had some significant unused slack beyond what you asked malloc to give you. So overwriting the end of the allocated buffer or using a free'd chunk would sometimes go undetected in v2.01; it now causes crashes inside malloc, realloc and free. > All processing is done in DOS mode in > memory on a 350Mhz PII system with 256 Mbytes of main memory and a free disk > space of about 1 Gbyte and CWSDPMI version r3. First, why do you use an old version of CWSDPMI? The latest version is r4; I suggest to upgrade. Second, how much memory (physical and virtual) does this program consume? There are known bugs in CWSDPMI when you go beyond 128MB of physical and swap (search the mail archives for messages by Charles Sandmann that describe the details). And third, did you configure CWSDPMI specially for running this program (like enlarged its internal heap and other parameters)? If so, please tell what did you change. > The resulting file of one pass containing the index for words starting with > letter 'a' was about 60 Mbytes. The hangup occurs in 'realloc()'. It is > usually a page fault. Please post the symified crash traceback when you report such problems. Otherwise, there's not much we can do to help you.