delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/17/07:38:42

Sender: mckee AT rtp DOT gtegsc DOT com
Message-ID: <332D39E6.1CAC@rtp.gtegsc.com>
Date: Mon, 17 Mar 1997 07:32:38 -0500
From: David McKee <david DOT mckee AT rtp DOT gtegsc DOT com>
Organization: GTE (My views are my own)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
CC: Ian D Romanick <idr AT cs DOT pdx DOT edu>
Subject: Re: problem with malloc in djgpp?
References: <199703141829 DOT KAA21871 AT xavier DOT cs DOT pdx DOT edu>

Ian D Romanick wrote:
> 
> > I suspect the problem is from the malloc() implementation.  I think it
> > allocates blocks in fixed sizes that keep on doubling. So when asking for
> > the 17M chunk, it's trying to get a 30 or 31 meg chunk, which is being
> > refused by DPMI since Windows only wants to give the program 32 megs.
> 
> Not exactly.  The malloc() routine that comes with DJGPP always rounds an
> allocation size UP to the NEXT power of two.  From 17, this just happens
> to be 32.
> 
> --
> "But art is the process of evoking pity and terror.     Art.  Masturbation.
>  What modern artists do is pseudo-intellectual               Whatever.
>  masturbation."                                      http://www.cs.pdx.edu/~idr
>         -- Stranger In A Strange Land

I noticed that in the dflat implementation that can be downloaded from 
the v2 release, that there was what appeared as a superfluous malloc 
routine.  It did not compile correctly and when I removed it I was able
to create dflat with no problem.  Does anyone know if the above
mentioned
problem is the reason that an additional malloc was included with the 
dflat window library, and if not, why in the world include another 
malloc that does not compile when djgpp has one that does?

Thanks.


-- David T. McKee:

- Raw text -


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