www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/01/23:00:31

Date: Wed, 1 Apr 1998 18:00:38 -0800 (PST)
Message-Id: <199804020200.SAA18615@adit.ap.net>
Mime-Version: 1.0
To: Noam Rotem <nrotem AT johnbryce DOT co DOT il>, "John M. Aldrich" <fighteer AT cs DOT com>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: malloc & free
Cc: djgpp AT delorie DOT com

At 10:47  4/1/1998 +0300, Noam Rotem wrote:
>John M. Aldrich wrote:
>
>> The answer is quite simple:  DJGPP's malloc()/free() does not return
>> freed memory blocks to the system; it keeps track of them for possible
>> reuse later.  At program termination, all allocated memory is returned
>> to the DPMI host.
>
>Is it faster to reuse freed memory than asking the dpmi server for it again?

Yes, and furthermore, I believe many DPMI servers don't have the capability
to shrink a memory allocation.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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