This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bad physical memory value detected


os.turlan@free.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]