python - Resident Set Size (RSS) limit has no effect -


2.6.32-22-Machine running Ubuntu 10.04 comes with the following problem: Resident set of any processing There is no effect in size (RSS). I currently set limits in Python with the following code:

  Import Resources # (100, 100) (soft, hard) range is ~ 100kb. Resource.setrlimit (source.RLIMIT_RSS, (100, 100)) memory_sink = ['a'] * 10000000 # should be unsuccessful  

list, memory_sink, every time I succeed Checking the use of RSS with the top, I can easily get the process of using 1GB RAM, which means that the limit is not working. Did the RSS not work with this kernel or distro? If it helps, then the resource .RLIMIT_NPROC (User Process Limit) works.

getrlimit manpage form: / P>

  resident set of RLIMIT_RSS process Specifies the range (in pages) (number of virtual pages residing in RAM). This limit is only available in Linux 2.4.x, x & lt; 30, and only affects the call to specify madvise (2) MADV_WILLNEED  

It seems that this is not supported on Linux kernel 2.6 only.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -