delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/06/09/19:50:51

From: k3040e4 AT c210 DOT edvz DOT uni-linz DOT ac DOT at (Oberhumer Markus)
Message-Id: <199606092343.BAA21128@c210.edvz.uni-linz.ac.at>
Subject: Re: Strange malloc()/free() behaviour
To: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Date: Mon, 10 Jun 1996 01:43:02 -0200 (MET DST)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <9606081839.AA11488@clio.rice.edu> from "Charles Sandmann" at Jun 8, 96 01:39:00 pm
Return-Read-To: markus DOT oberhumer AT jk DOT uni-linz DOT ac DOT at

> 
> > When running this short program I get the following output:
> > > Your system allowed me to malloc 15351808 bytes.
> > > But now there's no free memory !
> 
> This is a flaw (feature?) in the default malloc() built into DJGPP.  It's
> exceptionally inefficient in it's usage of memory, instead designed for
> speed.  I have a somewhat slow but very memory efficient version which

It looks more like a bug to me. I malloc all available memory,
free everything and then malloc() won't work any more.
Any suggestions ?

- Raw text -


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