This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: heap_chunk_in_mb not working? Windows Server 2012
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 9 Jul 2013 12:47:44 +0200
- Subject: Re: heap_chunk_in_mb not working? Windows Server 2012
- References: <18D2D60441EEB14B9007A0412561D3C20741F6 at SINEX14MBXC421 dot southpacific dot corp dot microsoft dot com>
- Reply-to: cygwin at cygwin dot com
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