delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/06/09:34:35

Date: Tue, 6 Feb 1996 15:20:28 +0100 (MET)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
From: solyom AT eik DOT bme DOT hu (Andras Solyom)
Subject: Re: malloc/free ends up fragmenting dynamic memory?

I wrote:
>
>> This problem with GNU's malloc has always been a sore point for me. One
>> could think that somebody has already solved it, as I have read so many
>> expert opinion on how to do it. Is there anybody who has the solution, or is
>> it so complicated to implement it that nobody has done it yet? I wonder... 
>
DJ's answer:

>Amazingly enough, it's not gnu's malloc.  Their malloc defrags as it
>goes (at least, if it sees adjacent free blocks).  DJGPP Uses a BSD
>malloc.
>
I did not know that. If I recall correctly the reason to select the current
type of malloc in DJGPP was that it goes well with virtual memory. Is it not
possible then at least to combine the BSD and GNU (or the Borland) type of
malloc to get the best of both world: fast virtual memory, which is
defragmented? Or are these incompatible things?
======================================================================
                                                     ,   ,
                                             Dr. Andras Solyom
                                        Department of Atomic Physics
                                      Technical university of Budapest
                                           H-1111 Budafoki ut 8.
                                                  Hungary
                                           Phone: (361) 463 1580
                                             Fax: (361) 463 4194

- Raw text -


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