delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/16/04:54:26

Date: Thu, 16 Nov 2000 11:52:59 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: Where is malloc info kept?
In-Reply-To: <8uumng$kq5$1@nnrp1.deja.com>
Message-ID: <Pine.SUN.3.91.1001116115136.5962B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 15 Nov 2000 dcasale AT my-deja DOT com wrote:

> Where is the malloc info kept for each allocation?  Is
> it in the bytes immediately prior to the returned pointer?

Some of the information is kept immediatley before and after the 
allocated buffer.  Some of the information is kept in internal data
structures inside malloc; see the source.

> But before it finishes on my large file set and gets to the point
> where the fault on the delete happens, it has a failed malloc.

Is the crash caused by the failed malloc?  That is, if malloc fails,
is the code written so that the program will crash?

> According to both
> _go32_dpmi_remaining_virtual_memory _and_
> _go32_dpmi_remaining_physical_memory, I've got plenty of space before
> any allocations should fail.
> 
> So what gives?  Could this be a case of memory corruption on my part, a
> buggy DPMI server...what?

Did you try to enlarge the CWSDPMI internal heap size, as explained in
section 15.4 of the FAQ?

Are you using CWSDPMI r5?  If not, please upgrade and try to enlarge
the default amount of virtual memory (``swap space'') supported by
CWSDPMI.

- Raw text -


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