delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/30/11:09:23

Date: Thu, 30 Oct 1997 18:07:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Demmer AT LStM DOT Ruhr-Uni-Bochum DOT De
cc: djgpp AT delorie DOT com
Subject: Re: malloc
In-Reply-To: <789617123B4@brain1.lstm.ruhr-uni-bochum.de>
Message-ID: <Pine.SUN.3.91.971030180118.5238E-100000@is>
MIME-Version: 1.0

On Thu, 30 Oct 1997, Tom Demmer wrote:

> This is basically my question. So, what does 
> info.available_physical_pages mean?
> If this _is_ the free memory, than it is not given back to the OS by 
> the DPMI host, i.e. sbrk() with a negative parameter does not increase 
> the amount of memory available for other processes.

I'm not sure I understand what you are saying here.  When CWSDPMI is 
used, the DPMI host *is* the OS, because nobody else have any need for 
the memory it manages (let's exclude real-mode programs that need raw XMS 
from this discussion).

And yes, available_physical_pages _is_ the free memory, AFAIK.

There's a subtlety with our `sbrk' when it is called with a negative
argument.  Charles Sandmann explained it to me once, but I forgot.  I
think our `sbrk' cannot return memory at all, but I'm not sure.  Maybe you
should ask Charles now.  (See also crt0.s in the library sources.)

> > It would be worthwhile, then, to run your tests in two different DOS 
> > boxes on Windows simultaneously, and use some memory-tracking program to 
> > track the Windows memory resources during the test.
> > 
> As is use Windows only on the rare occasions when I really have to 
> draw something myself, I don't have any reliable memory tracking 
> programs. I doubt I have a working windows installation at all ;-)

Anybody?

- Raw text -


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