Mail Archives: cygwin/2012/10/10/03:56:14
On Sep 24 17:29, Saurabh T wrote:
>
> I have been trying to get perl to use 2GB of memory (this is on a 32 bit xp machine with 4 GB total memory). As per http://cygwin.com/cygwin-ug-net/setup-maxmem.html I tried
> peflags --cygwin-heap=2048 /usr/bin/perl
This can't work. Regardless of your physical memory installed, the
virtual memory is restricted to 2 Gigs per process, unless you use the
methods described in
http://msdn.microsoft.com/en-us/library/bb613473%28VS.85%29.aspx
But even then, the virtual memory layout of a 32 bit process (image,
stack, heap, DLL placement) is so that you won't get more than about 1
Gig of heap, even if you booted the system in /3GB mode.
Have a look into /proc/$PID/maps, it's quite instructive. It's very
simple with less:
$ less /proc/self/maps
> However this causes perl to not write to screen.
> On further investigation, I found the magic number to be 1040:
>
> $ peflags --cygwin-heap=1039 /usr/bin/perl
> /usr/bin/perl: initial Cygwin heap size: 1039 (0x40f) MB
>
> $ perl -e 'print "Hello\n";'
> Hello
>
> $ peflags --cygwin-heap=1040 /usr/bin/perl
> /usr/bin/perl: initial Cygwin heap size: 1040 (0x410) MB
>
> $ perl -e 'print "Hello\n";'
>
> $
>
> In other words, anything 1040 and above, perl stops writing to screen.
> I have the latest cygwin (1.7.16) and perl (5.14.2).
> Any idea what might be wrong? Thank you.
I can't reproduce this, even with --cygwin-heap=2048. While Cygwin
tries to allocate such a heap, it will fallback to a smaller heap
if that's not possible.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader 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 -