Date: Thu, 9 Jul 1998 00:40:07 -0300 (ADT) From: Michael Richards <miker@scifair.acadiau.ca> To: questions@FreeBSD.ORG Subject: Perl running out of memory at the 16M mark Message-ID: <Pine.BSF.3.96.980709001948.22600A-100000@scifair.acadiau.ca>
next in thread | raw e-mail | index | archive | help
Hi peoples...
I have an teresting perl problem. I would post it to a perl group, but I
suspect the problem is the user limits. Here is a simple script that
causes the perl interpreter to die:
[root@frodo projects]# cat test.pl
#!/usr/local/bin/perl
$|=1;
for ($i=0;$1<160;$i++) {
$test[$i]='a' x 100000;
print "size is ".$i."00000\n";
}
[root@frodo projects]# !limits
limits -U root -B
Resource limits for class root:
cputime infinity secs
filesize infinity kb
datasize infinity kb
stacksize infinity kb
coredumpsize infinity kb
memoryuse-max infinity kb
memoryuse-cur 131072 kb
memorylocked infinity kb
maxprocesses-max infinity
maxprocesses-cur 64
openfiles-max infinity
openfiles-cur 1024
[root@frodo projects]# ./test.pl
size is 000000
size is 100000
size is 200000
...
size is 16000000
Out of memory!
[root@frodo projects]#
Does anyone care to point out the error? I have read the man page for
limits until I was blue, and I think I am running it correctly. I am root
here anyway. The machine has 128 megs of RAM and oodles free swap. It is a
2.2.5-release box with the latest perl 5.004 installed.
-Mike
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980709001948.22600A-100000>
