[opensuse-programming] Per-process memory limit (bash's ulimit -m)
Hi, Can anyone affirm that this feature really work on Linux? I want to restrict the amount of RAM consumed of each process, and any excess to be swapped. With Bash, 'ulimit -m' is supposed to limit the max. memory used by each process. However, my test program can still exceed the limit. This program just allocates and repeateadly touch a 4-MB array. But regardless the limit, the process still consume 4+ MB of RSS. I suspect this is not supported in Linux, since the manpage of setrlimit() doesn't say any RLIMIT_* related to (resident) memory. Any insight on this subject? Regards, Verdi -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
Answering myself.. it's not supported on kernel 2.6 which is what I'm using. On 25 June 2010, Verdi March wrote:
Can anyone affirm that this feature really work on Linux?
[deleted]
I suspect this is not supported in Linux, since the manpage of setrlimit() doesn't say any RLIMIT_* related to (resident) memory.
There're two manpages, and one of these (section 2) says that RLIMIT_RSS works only for kernel 2.4.30 or older :( Regards, Verdi -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
participants (1)
-
Verdi March