perl - segfault on "free unused scalar"
Gerrit P. Haase
gerrit@familiehaase.de
Wed Jul 27 19:35:00 GMT 2005
Krzysztof Duleba wrote:
> But there's plenty of memory left when perl crashes. I have 1 GB RAM and
> 1 GB swap file.
>
> I've simplified the test case. It seems that Cygwin perl can't handle
> too much memory. For instance:
>
> $ perl -e '$a="a"x(200 * 1024 * 1024); sleep 9'
This requires about 525 MB on my box.
> OK, this could have failed because $a might require 200 MB of continuous
> space. But hashes don't, do they? Then why does the following code fail?
>
> $ perl -e '$a="a"x(1024 * 1024);my %b; $b{$_}=$a for(1..400);sleep 9'
>
> Or that one?
Requires a little more, maybe about 550 MB.
> $ perl -e '$a="a"x(50 * 1024 * 1024);$b=$a;$c=$a;$d=$a;$e=$a;sleep 10'
This requires not that much, nearly 400 MB, but it is still about 16 MB
too much for the default Cygwin settings of 384 MB per program.
> On linux there's no such problem - perl can use all available memory.
Please see the docs about the limits on Cygwin how to increase the
maximum memory usage:
http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html#setup-maxmem
Regards,
Gerrit
--
=^..^=
--
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/
More information about the Cygwin
mailing list