delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/06/09:14:25

Date: Sun, 6 Feb 2000 15:53:14 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: majzikm AT softhome DOT net
cc: djgpp AT delorie DOT com
Subject: Re: problems with CWSDPMI
In-Reply-To: <87jplv$lr7$1@nnrp1.deja.com>
Message-ID: <Pine.SUN.3.91.1000206154559.9563E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 6 Feb 2000 majzikm AT softhome DOT net wrote:

> I am just writing a C++ program with DJGPP.
> It uses "new" to allocate memory. However sometimes
> I get an error saying General protection fault when my
> program uses "new".

Crashes inside `new'/`delete' (or `malloc'/`free', their C counterparts)
are usually symptoms of programs that write beyond the end of allocated 
buffers.  See section 9.2 of the DJGPP FAQ list (v2/faq230b.zip from the 
usual DJGPP sites) for more information.  That section also suggests to 
use an malloc debugging package such as YAMD to track down these problems.

In general, when a program crashes and you ask for help in solving that,
you should always post here the complete crash message, after running 
SYMIFY on it.  The crash message includes several important hints about 
the nature of the problem, which some people here can read and 
undersdand, and that will allow them to help you much more efficiently.

Section 12.2 of the FAQ explains how to interpret important parts of the 
crash message; I suggest to read that section.

> It has to allocate a lot of small memories.
> I read somewhere that this is the problem.
> So I tried both cwsparam (Paragraphs of memory for extra CWSDPMI
> internal heap..) and stubedit to increase the site of stack.

Are you running your programs on DOS or on Windows?  If you run them on 
Windows, the possible problems with CWSDPMI are not relevant, since 
CWSDPMI is not used on Windows.

- Raw text -


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