Get and set process resource limits. Each function returns the current limits, and
can optionally update the limit by passing argument values. The
function is a convenience wrapper which prints all current hard and soft limits.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
rlimit_all() rlimit_as(cur = NULL, max = NULL) rlimit_core(cur = NULL, max = NULL) rlimit_cpu(cur = NULL, max = NULL) rlimit_data(cur = NULL, max = NULL) rlimit_fsize(cur = NULL, max = NULL) rlimit_memlock(cur = NULL, max = NULL) rlimit_nofile(cur = NULL, max = NULL) rlimit_nproc(cur = NULL, max = NULL) rlimit_stack(cur = NULL, max = NULL)
set the current (soft) limit for this resource. See details.
set the max (hard) limit for this resource. See details.
Each resource has an associated soft and hard limit. The soft limit is the value that the kernel enforces for the corresponding resource. The hard limit acts as a ceiling for the soft limit: an unprivileged process may set only its soft limit to a value in the range from 0 up to the hard limit, and (irreversibly) lower its hard limit.
Definitons from the Linux manual page are as follows:
RLIMIT_AS : the maximum size of the process's virtual memory (address space) in bytes.
RLIMIT_CORE : the maximum size of a core file that the process may dump.
RLIMIT_CPU : a limit in seconds on the amount of CPU time (not elapsed time) that
the process may consume. When the process reaches the soft limit, it is sent a
RLIMIT_DATA : the maximum size of the process's data segment (initialized data, uninitialized
data, and heap).
RLIMIT_FSIZE : the maximum size of files that the process may create. Attempts to extend a
file beyond this limit result in delivery of a SIGXFSZ signal.
RLIMIT_MEMLOCK : the maximum number of bytes of memory that may be locked into RAM.
RLIMIT_NOFILE : a value one greater than the maximum file descriptor number that can be opened
by this process.
RLIMIT_NPROC : the maximum number of processes that can be created for the real user ID of the
calling process. Upon encountering this limit, fork fails with the error EAGAIN. Not enforced for
RLIMIT_STACK : the maximum size of the process stack, in bytes.
Note that the support for enforcing limits very widely by system. In particular
RLIMIT_AS has a different meaning depending on how memory allocation is managed
by the operating system (and doesn't work at all on MacOS).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.