[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Limiting memory with ulimit
- To: Ilya Konstantinov <linux-il(at-nospam)future.galanet.net>, Linux-IL <linux-il(at-nospam)cs.huji.ac.il>
- Subject: Re: Limiting memory with ulimit
- From: "Nadav Har'El" <nyh(at-nospam)math.technion.ac.il>
- Date: Thu, 12 Apr 2001 14:01:10 +0300
- Hebrew-Date: 19 Nisan 5761
- In-Reply-To: <20010412134343.B7777@pollux.galanet.net>; from linux-il@future.galanet.net on Thu, Apr 12, 2001 at 01:43:43PM +0300
- References: <20010412134343.B7777@pollux.galanet.net>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
- User-Agent: Mutt/1.2i
On Thu, Apr 12, 2001, Ilya Konstantinov wrote about "Limiting memory with ulimit":
> Hi,
>
> I currently have a hard data seg limit of 30,000K (ulimit -Hd) and I'm
> trying to run a perl-one liner:
>
> perl -e 'for (0..1000000) { push @x,"1234567890"; }; print <>;'
>
> which easily manages to allocate 46,352K VSZ and 44,448K RSS.
>
> Could anyone please tell me what do I have to limit for the memory
> restriction to actually take place?
This is weird... I tried it, and indeed the ulimit -d seems to have no
effect! Is this a bug in Linux's handling of this limit? (I'm using kernel
2.2.16 and zsh 3.0.8).
Anyway, "ulimit -v" (limiting the amount of virtual memory the process)
seems to work fine:
$ ulimit -v 10000
$ perl -e 'for (0..1000000) { push @x,"1234567890"; }; print <>;'
Out of memory!
--
Nadav Har'El | Thursday, Apr 12 2001, 19 Nisan 5761
nyh@math.technion.ac.il |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |How do you get holy water? Boil the hell
http://nadav.harel.org.il |out of it.
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il