delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/11/13:51:08

X-Spam-Check-By: sourceware.org
Message-ID: <e48c5e540705111050h24fc1636q7cf4fb33f72a7e7b@mail.gmail.com>
Date: Fri, 11 May 2007 13:50:48 -0400
From: "Matt McClure" <mlm AT aya DOT yale DOT edu>
To: cygwin AT cygwin DOT com
Subject: peculiar behavior of max_memory and heap_chunk_in_mb
MIME-Version: 1.0
X-Google-Sender-Auth: 178431a597247e2d
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

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/

- Raw text -


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