delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/14/14:06:36

From: Ian D Romanick <idr AT cs DOT pdx DOT edu>
Message-Id: <199703141829.KAA21871@xavier.cs.pdx.edu>
Subject: Re: problem with malloc in djgpp?
To: s335194 AT student DOT uq DOT edu DOT au (David Wilson)
Date: Fri, 14 Mar 1997 10:29:43 -0800 (PST)
Cc: djgpp AT delorie DOT com
In-Reply-To: <5gbio4$874$1@nargun.cc.uq.edu.au> from "David Wilson" at Mar 14, 97 01:10:28 pm
MIME-Version: 1.0

> 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

- Raw text -


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