The following list contains the single-process resource parameter limits for Unix/Linux systems. The rlimit_core parameter is much used in server development (when core dump is required ).
Code snippet:
memset(&limit, 0, sizeof(limit)); limit.rlim_cur = RLIM_INFINITY; limit.rlim_max = RLIM_INFINITY; if(setrlimit(RLIMIT_CORE, &limit)) {spd_log(LOG_WARNING, " unable to disable core size res limit %s\n", strerror(errno)); } if(getrlimit(RLIMIT_CORE, &limit)) {spd_log(LOG_WARNING, "unable to check rlimit of fd%s\n", strerror(errno));}
Name |
Meaning |
Rlimit_as |
Maximum memory size available to processes |
Rlimit_core |
The maximum size of the core file. If it is 0, the core file cannot be created. |
Rlimit_cpu |
Maximum CPU time (unit: seconds) |
Rlimit_data |
Maximum Data Segment Size |
Rlimit_fsize |
Maximum size of the created File |
Rlimit_locks |
Maximum number of file locks that can be created by a process |
Rlimit_memlock |
Use mlock to lock the maximum memory size in the process |
Rlimit_nofile |
Maximum number of files opened in a process |
Rlimit_nproc |
Maximum number of sub-processes per real User ID |
Rlimit_rss |
Maximum size of resident storage Zone |
Rlimit_sbsize |
Maximum Socket buffer size |
Rlimit_stack |
Maximum stack size |
Rlimit_vmem |
= Rlimit_as |
Platform support
Restrictions |
FreeBSD 5.2.1 |
Linux 2.4.22 |
Mac OS X 10.3 |
Solaris 9 |
Rlimit_as |
N |
|
N |
|
Rlimit_core |
|
|
|
|
Rlimit_cpu |
|
|
|
|
Rlimit_data |
|
|
|
|
Rlimit_fsize |
|
|
|
|
Rlimit_locks |
N |
|
N |
N |
Rlimit_memlock |
|
|
|
N |
Rlimit_nofile |
|
|
|
|
Rlimit_nproc |
|
|
|
N |
Rlimit_rss |
|
|
|
N |
Rlimit_sbsize |
|
N |
N |
N |
Rlimit_stack |
|
|
|
|
Rlimit_vmem |
|
N |
N |