X-Spam-Check-By: sourceware.org Message-ID: <108fc8470605102346g162674fdic41c75613e4dc3e4@mail.gmail.com> Date: Thu, 11 May 2006 02:46:28 -0400 From: "Brad Krane" To: "Cygwin General List" Subject: Increasing Available Memory for Cygwin Run Programs in XP MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Disposition: inline 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k4B6kdnY003732 I am trying to run a numerical simulation that requires a large amount of RAM in the cygwin environment running on a Pentium 4 with Windows XP and 3GB RAM. I have so far learned that Windows XP (and other Windows versions) allot only 2GB RAM for user program space. I have verified this with a small program I developed that allocates the maximum available memory to 4 bytes. In Windows when I run this program I am able to allocate a total of 1.94GB of memory, however, when I run the same code in Cygwin I am only able to allocate 1.12GB of memory. I am not the only person to have come across a similar problem in the past. I have been searching through the archives and so far have found 3 notable references from topics that can be found here: http://sourceware.org/ml/cygwin/2005-04/msg01309.html http://sources.redhat.com/ml/cygwin/2003-02/msg00234.html http://sourceware.org/ml/cygwin/2004-06/msg01248.html In the first topic it is said that using the -mno-cygwin flag in the compiler options will allow programs to gain access to more memory by having them by pass the cygwin1.dll. This however produces the undesirable side effect of an error compiling, as the program references sys/resource.h and I can only assume that this would require the use of cygwin1.dll. I don't suppose there is much of a way around this? The second idea I found was to set the registry item "/HKEY_CURRENT_USER/Software/Cygnus\ Solutions/Cygwin/heap_chunk_in_mb x" where 'x' is the amount in MB(obviously). I set this value to a safe amount of 1950000MB or 1.90GB. Unfortunately this does nothing and I am left with the exact same amount of memory. Finally there was the idea to run XP with the /3gb option set in the boot.ini to increase the user program space from 2GB to 3GB. The problem is that after a reboot I am still only able to allocate 1.94GB of RAM with a Windows XP binary and 1.12GB through Cygwin. Could this be a side-effect of having only 3GM or physical memory or would the page file accommodate this(as I think)? I've noticed that the messages are at least one year old. Has anything significant that would affect these "fixes" have changed since then? Does anyone have any fresh ideas or work around aside from a new OS? ;) On a further note I have noticed that in the Advanced Properties of the Cygwin shortcut that is set to run in a separate memory space by default and I am unable to change this even when making a shortcut directly to bash.exe itself. Could this be affecting the available memory and if so is there anyway to modify this property? Thank you for your time and effort. -- Brad -- 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/