Mail Archives: djgpp/1997/10/28/03:49:49

Date: Tue, 28 Oct 1997 10:49:08 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: John Machin <sjmachin AT lexicon DOT net DOT au>
cc: djgpp AT delorie DOT com
Subject: Re: malloc()
In-Reply-To: <>
Message-ID: <Pine.SUN.3.91.971028104653.22947N-100000@is>
MIME-Version: 1.0

On Tue, 28 Oct 1997, John Machin wrote:

> This could be fixed, but I am puzzled why DJ hasn't snarfed a better
> malloc from somewhere -- I understand his comments about GNU GPL
> that he made in a posting, but what about public-domain stuff???

The version of `malloc' in the current libc *is* public domain: it's
from the BSD library.  GPL'ed code is not good enough for DJGPP's
libc, because libc needs to be free, not GPL'ed.  Most of the
``better'' allocators (at least those I'm aware of) are either
GPL/LGPL or have other non-free distribution policies.  If you know
about a place where gobs of public-domain allocators are available,
please tell where that place is.

> Pardon me if this has been considered and rejected it for 
> reasons that I can't guess, but I'd suggest that "Doug Lea's malloc" 
> would be a good substitute. I got it off the web, whacked in a few 
> #defines, compiled it, and happiness prevailed; see below which is 
> the first few lines of the source file with my changes and his 
> "advertisement" and URLs.

Thanks for your suggestion.  However, your message makes it sound much 
easier than it really is.

Past experience of DJGPP development suggests a simple truth: it is not
enough to ask ``why not'' questions such as this, or even see that a given
library compiles with DJGPP after some hacking.  To replace a
functionality as central as `malloc' requires that somebody actually sits
down, understands the features and limitations of both the original and
the replacement, makes some comparative tests of the two, and posts the
results for a review.  Dumping a bunch of #ifdef's into a message and
asking others to do the actual work doesn't help a bit.  It would help a
lot more if you would volunteer to integrate the replacement `malloc' into
the library, including any necessary changes in the headers and the libc
reference docs, then submit the patches to DJ Delorie (who maintains the

(Of course, I'm assuming that the distribution terms live up to the
``public domain'' definition.  The fine print could tell otherwise.)

- Raw text -

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