[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Resource limit question



Ethan Benson wrote on Sat, 24 Mar 2001 14:32:44 -0900
>> I have set a hard limit on memoryuse to 10000 (10M).  limits (or
>> ulimit -a) shows the limit but, it doesn't seem to be working.
>> For example, with the limit set the following bit of code
>
>[sniped code]
>
>> compiled as follows:
>> 	 cc tst.c
>> give me the output:
>> RSS limit curr, max: 10240000, 10240000
>> weinberg 25601 11.0 16.2 41000 20836 pts/1   S    16:25   0:00 ./a.out
>> Note the RSS limit of 10M.  But the code as a data size of
>> 20M to start and mallocs an additional 20M.  What am I missing?
>
>that the kernel does not have a proper bean counter so these resource
>limits don't work. 
>
>the only way to limit memory usage is to limit `virtual memory' use
>ulimit -v or the `as' limit in /etc/security/limits.conf. 

Thanks very much for the info!  Good to know.  I've been assuming that
this has been working for years.  I do have a vague recollection that
"memoryuse" has worked in the past under Linux, no?

Do you, by any chance, have a pointer to the kernel
documenation/source tree on this?

--Martin



Reply to: