Mail Archives: djgpp/1997/03/06/10:15:39
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 -