Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 and . 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/