Allows you to get and set resource limits
This class retrieves the specified resource limits when it is created and places them in two variables, current and max. Current is the current limit of a resource and max is the hard kernel limit which cur is not allowed to exceed. The resources you can request are Posix.RLIMIT_CPU (seconds of processor time); Posix.RLIMIT_DATA (maximum size of data segment); Posix.RLIMIT_FSIZE (maximum file size); Posix.RLIMIT_LOCKS (maximum number of locked files); Posix.RLIMIT_MEMLOCK (maximum bytes of memory that can be locked into RAM); Posix.RLIMIT_NOFILE (maximum number of files that can be opened); Posix.RLIMIT_NPROC (maximum number of processes that can be created by the real user ID of the calling process); Posix.RLIMIT_RSS (maximum RSS size in pages); Posix.RLIMIT_STACK (maximum size of the stack in bytes). The set() method attempts to set the resource limit (presumably after modifying current and/or max). On failure, it returns false and sets err.str.
|
|
|
|
|