delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/06/10:15:39

Date: Thu, 6 Mar 1997 16:59:33 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Morten Heiberg Rasmussen <heiberg AT daimi DOT aau DOT dk>
cc: djgpp AT delorie DOT com
Subject: Re: Bug in malloc/free ?
In-Reply-To: <5fm6r7$6av$1@gjallar.daimi.aau.dk>
Message-ID: <Pine.SUN.3.91.970306165621.21561B-100000@is>
MIME-Version: 1.0

On 6 Mar 1997, Morten Heiberg Rasmussen wrote:

> In the program there is a function avail_mem() that tries to estimate the
> size of the free heap by allocating as much as possible (down to blocks
> of 32 bytes) and then freeing it all again. In main() I then call this
> function and print the result. Afterwards I try to do two allocations. One
> of 12345 bytes and then one of 30000 bytes. The allocation of 12345 bytes
> fails while the one of 30000 bytes succeeds.

A while ago (like 4 weeks?) Anthony Appleyard posted a small patch to 
malloc/free that might make this problem go away.  You can find that 
patch by searching the DJGPP mail archives, at this URL:

	http://www.delorie.com/djgpp/mail-archives/

(I would suggest searching for malloc and appleyard).

If you do find that patch to be the solution, please say so here.  
Thanks.

- Raw text -


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