X-Spam-Check-By: sourceware.org Message-ID: Date: Fri, 11 May 2007 13:50:48 -0400 From: "Matt McClure" To: cygwin AT cygwin DOT com Subject: peculiar behavior of max_memory and heap_chunk_in_mb MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 178431a597247e2d Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 What explains this peculiar behavior of max_memory and heap_chunk_in_mb? Following the instructions at: http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html, I increased Cygwin's memory limit to 1024MB: $ regtool -i set /HKLM/Software/Cygnus\ Solutions/Cygwin/heap_chunk_in_mb 1024 and after closing all Cygwin programs, and restarting, then I see: $ $ ./max_memory.exe 3fffe000 bytes (1024.0Mb) Makes sense so far. Curious what the default limit on my system is, I unset the limit and tried again: $ regtool unset /HKLM/Software/Cygnus\ Solutions/Cygwin/heap_chunk_in_mb $ regtool -v list /HKLM/Software/Cygnus\ Solutions/Cygwin mounts v2\ (Cygwin) Program Options\ (cygnus) After closing and restarting: $ ./max_memory.exe 5fffe000 bytes (1536.0Mb) Huh? The documentation says the default limit is 384MB. Okay, maybe the documentation is wrong, so I tried setting the limit to 384MB. $ regtool -i set /HKLM/Software/Cygnus\ Solutions/Cygwin/heap_chunk_in_mb 384 $ regtool -v list /HKLM/Software/Cygnus\ Solutions/Cygwin mounts v2\ (Cygwin) Program Options\ (cygnus) heap_chunk_in_mb = 0x00000180 (384) And after quitting and restarting: $ ./max_memory.exe 5fffe000 bytes (1536.0Mb) Now something is fishy for sure. The good news is that when I set the limit to 2048, the program I'm really trying to run works. I'd like to understand why the max_memory test is reporting strange results, though. Matt -- 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/