Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42E7DEA5.3040400@familiehaase.de> Date: Wed, 27 Jul 2005 21:21:09 +0200 From: "Gerrit P. Haase" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 MIME-Version: 1.0 To: Krzysztof Duleba CC: cygwin AT cygwin DOT com Subject: Re: perl - segfault on "free unused scalar" References: <42E76865 DOT 4000301 AT familiehaase DOT de> <42E7B413 DOT 8040203 AT familiehaase DOT de> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/