delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/07/09/06:48:02

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=oYxrrKBntmiXZNzJQe9aosv/JGtEtoHWC3hjo+F8wnU0DziuFyE0M
JyTaGQy3tPPpuFdVGBfwtMMgMOoTVwpOr7hRlPYHKPm6RpUxq5ND4oQp6ko5pq5o
X3V20LYI5WH46IloVnzZdqBDPZxuCG7WADkkM3NwIETPGRe942gNJU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=NUZPYvsdjW2mum5dOhwcx7LchnM=; b=T0MKh8jgyRhoOfEIFGWyBB0MY+eQ
EujW5Ag5D+o6MXcw/dbVwX4Fl1jjpvHMVKQJwAX0e1t018Uz3el2t2qE8GsfHDrd
aDYaVCWGn5Le+DDlxuPq6S+WTkZPxebiwwYoNPccn4Ia03bNch38LjSsnbowDnaF
NW5mhGG5ZYsC0Qg=
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
X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.3.1
Date: Tue, 9 Jul 2013 12:47:44 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: heap_chunk_in_mb not working? Windows Server 2012
Message-ID: <20130709104744.GA27319@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <18D2D60441EEB14B9007A0412561D3C20741F6 AT SINEX14MBXC421 DOT southpacific DOT corp DOT microsoft DOT com>
MIME-Version: 1.0
In-Reply-To: <18D2D60441EEB14B9007A0412561D3C20741F6@SINEX14MBXC421.southpacific.corp.microsoft.com>
User-Agent: Mutt/1.5.21 (2010-09-15)

On Jul  8 06:54, Frank Seide wrote:
> Hi, I am not able to enlarge the memory size from the 256 MB default.

The default heap is 384 Megs.

> Specifically, a perl script fails after allocating 256 MB (I get is a
> message "Out of memory!" when running /bin/perl.exe; in Task Manager,
> perl.exe had just grown its private working set to 266,xxx).

The working set doesn't tell you safely about the virtual memory a
process already takes.

Does it try to allocate 256 Megs in a single block?  There are multiple
reasons that this may fail, one is that the VM is fragmented so that
there's no 256Megs block available, another is a too small pagefile.

> I tried the following two commands, to no avail. None of the tips I found on the FAQ or mailing lists (=basically these two) worked.
> 
> % regtool -i set /HKLM/Software/Cygwin/heap_chunk_in_mb 2000

This is an old method and doesn't work anymore.

> % peflags --cygwin-heap=2000 /bin/perl.exe  
> % peflags --cygwin-heap /bin/perl.exe
> /bin/perl.exe: initial Cygwin heap size: 2000 (0x7d0) MB

This is the right method, but did you really think about it?  2 Gigs is
what a 32 bit process usually(*) gets as its *entire* virtual memory,
including the image itself, all loaded DLLs, all thread stacks, all
shared memory etc.

(*) Unless you're on a 64 bit machine, in which case you get 4 Gigs VM
    per process if the executable has the large-address awareness bit
    set (see peflags).

> I am running on a x64 Windows Server 20*12*. Could that be a problem?

No.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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