Gentoo Archives: gentoo-user

From: "b.n." <brullonulla@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] limit maximum memory size of any process
Date: Mon, 03 Nov 2008 11:42:59
Message-Id: 490EE4F4.30709@gmail.com
In Reply to: [gentoo-user] limit maximum memory size of any process by Zhang Weiwu
1 Zhang Weiwu ha scritto:
2
3 > So: is ulimit the solution? If so, what option should I set? My current
4 > ulimit is:
5 >
6 > $ ulimit -a
7 > core file size (blocks, -c) 0
8 > data seg size (kbytes, -d) 300000
9 > scheduling priority (-e) 0
10 > file size (blocks, -f) unlimited
11 > pending signals (-i) 3072
12 > max locked memory (kbytes, -l) 32
13 > max memory size (kbytes, -m) 300
14 > open files (-n) 1024
15 > pipe size (512 bytes, -p) 8
16 > POSIX message queues (bytes, -q) 819200
17 > real-time priority (-r) 0
18 > stack size (kbytes, -s) 8192
19 > cpu time (seconds, -t) unlimited
20 > max user processes (-u) 3072
21 > virtual memory (kbytes, -v) unlimited
22 > file locks (-x) unlimited
23
24
25 On my machine I use "ulimit -v" and it works- however never tried it
26 inside a script.
27
28 m.