www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/17/22:45:47

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Weirdness with _go32_remaining_physical_memory
Date: Mon, 17 Feb 1997 20:38:35 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 26
Message-ID: <3309324B.248C@cs.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970216093914 DOT 14977I-100000 AT is> <5eah0d$if4 AT fep4 DOT clear DOT net DOT nz>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp204.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Malcolm Taylor wrote:
> 
> I have a feeling that it doesn't work correctly under Windows (doesn't
> report the right number). Is this true, and if so how could I get a
> better estimate of the actual remaining physical memory under Windows?
> I know that the available lockable memory should be a good estimate,
> however does Windows report this one properly?

Virtual memory management is a function of Windows' DPMI host, and as
such, cannot be changed by the programmer.  The
_go32_dpmi_remaining_*_memory() functions are just wrappers to DPMI
calls, and can only report what they see.

The way Windows handles virtual memory is to simply bundle all of
physical and virtual memory into one lump and call it "physical"
memory.  Try typing 'mem' from a Win3.1 DOS prompt and look at the EMS
line - you'll see what I mean.  I'm sorry, but I don't know any good way
around this.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |        fighteer AT cs DOT com         |
|    *  Proud user of DJGPP!  *    |   http://www.cs.com/fighteer   |
|    ObJoke:  If Bill Gates were a robber, not only would he        |
|     shoot you, but he'd send you a bill for the bullets.          |
---------------------------------------------------------------------

- Raw text -


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