delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/06/08:49:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <41B46435.F2117D49@dessent.net>
Date: Mon, 06 Dec 2004 05:52:53 -0800
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Bad physical memory value detected
References: <1102339169 DOT 41b45c618b5f0 AT imp3-q DOT free DOT fr>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

os DOT turlan AT free DOT fr wrote:

> cygwin has been installed on a Windows 2000 server and it detected 2Gb of
> memory, correct value at this time.
> 
> But some days ago we have increased the physical memory from 2Gb to 4Gb. The
> problem is that cygwin continue to see only 2Gb ("top" and "vmstat" commands
> results).
> 
> Can somebody help me please to resolve this issue ?

The Cygwin DLL calls GlobalMemoryStatus() to get the amount of total and
free memory for /proc/meminfo.  From the MS Platform SDK entry on this
function:

""
On Intel x86 computers with more than 2 GB and less than 4 GB of memory,
the GlobalMemoryStatus function will always return 2 GB in the
dwTotalPhys member of the MEMORYSTATUS structure. Similarly, if the
total available memory is between 2 and 4 GB, the dwAvailPhys member of
the MEMORYSTATUS structure will be rounded down to 2 GB. If the
executable is linked using the /LARGEADDRESSWARE linker option, then the
GlobalMemoryStatus function will return the correct amount of physical
memory in both members.
""

It would seem that the DLL should perhaps instead call
GlobalMemoryStatusEx() which does not have issues with large amounts of
memory.  However this function is only available in 2k/XP/2k3.  There
would need to be fallback to GlobalMemoryStatus() for NT/9x/ME which is
probably why it was chosen in the first place.

I think this is where someone traditionally points out
<http://cygwin.com/acronyms/#SHTDI> and
<http://cygwin.com/acronyms/#PTC>.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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