Pike v8.0 release 1738

Method System.getrlimit()


Method getrlimit

array(int) getrlimit(string resource)

Description

Returns the current process limitation for the selected resource.

Parameter resource
cpu

The CPU time limit in seconds.

fsize

The maximum size of files the process may create.

data

The maximum size of the process's data segment.

stack

The maximum size of process stack, in bytes.

core 
rss

Specifies the limit of pages the process's resident set.

nproc

The maximum number of processes that can be created for the real user ID of the calling process.

nofile

The maximum number of file descriptors the process can open, +1.

memlock

The maximum number of bytes of virtual memory that may be locked into RAM.

as 
vmem 
Returns
Array
int 0

The soft limit for the resource. -1 means no limit.

int 1

The hard limit for the resource. -1 means no limit.

Note

This function nor all the resources are available on all systems.

See also

getrlimits, setrlimit