Date: Thu, 30 Oct 1997 18:07:06 +0200 (IST) From: Eli Zaretskii 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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?