Purpose
Controls maximum
system resource consumption.
Library
Standard C
Library (libc.a)
Syntax
#include <sys/time.h>
#include <sys/resource.h>
void kgetrlimit64 (Resource1, RLP)
int Resource1;
struct rlimit64 *RLP;
Parameters
Item |
Description |
Resource1 |
The Resource1 parameter can be one of the following
values:
- RLIMIT_AS
- The maximum size, in bytes, of the total available memory of a process. This
limit is enforced by the kernel only if the XPG_SUS_ENV=ON environment variable
is set in the user's environment before the process is executed. If the
XPG_SUS_ENV environment variable is not set in the user's environment, the limit
is not enforced.
- RLIMIT_CORE
- The largest size, in bytes, of a core file that can be created. This limit is enforced by the
kernel. If the value of the RLIMIT_FSIZE limit is less than the value of the
RLIMIT_CORE limit, the system uses the RLIMIT_FSIZE limit value as the soft
limit.
- RLIMIT_CPU
- The maximum amount of central processing unit (CPU) time, in seconds, to be used by each
process. If a process exceeds its soft CPU limit, the kernel sends a SIGXCPU signal to the
process. After the hard limit is reached, the process is killed with SIGXCPU, even if it
handles, blocks, or ignores that signal.
- RLIMIT_DATA
- The maximum size, in bytes, of the data region for a process.
This limit defines how far a program can extend its break value with
the sbrk subroutine. This limit is enforced by the kernel.
- RLIMIT_FSIZE
- The largest size, in bytes, of any single file that can be created. When a process attempts to
write, truncate, or clear beyond its soft RLIMIT_FSIZE limit, the operation fails with the
errno variable set to EFBIG. If the environment variable
XPG_SUS_ENV=ON is set in the user's environment before the process is issued,
then the SIGXFSZ signal is also generated.
- RLIMIT_NOFILE
- This is a number one greater than the maximum value that the system
can assign to a newly-created descriptor.
- RLIMIT_STACK
- The maximum size, in bytes, of the stack region for a process. This limit defines how far a
program stack region can be extended. The system automatically performs stack extension. This limit
is enforced by the kernel. When the stack limit is reached, the process receives a SIGSEGV
signal. If this signal is not caught by a handler using the signal stack, the signal ends the
process.
- RLIMIT_RSS
- The maximum size, in bytes, to which the resident set size of
a process can grow. This limit is not enforced by the kernel. A process
might exceed its soft limit size without being ended.
|
RLP |
Points to the rlimit64 structure where the requested
limits are returned by the kgetrlimit64 kernel service. |
Description
The kgetrlimit64 kernel
service returns the values of limits on system resources used by the
current process and its children processes.
Note: The initial
values returned by the kgetrlimit64 kernel service are the
ulimit values in effect when the process was started. For maxdata
programs the initial soft limit for data is set to the lower of data
ulimit value or a value corresponding to the number of data segments
reserved for data segments.
The rlimit64 structure
specifies the hard and soft limits for a resource, as defined in the sys/resource.h file.
The RLIM64_INFINITY value defines an infinite value for a limit.
Execution Environment
The kgetrlimit64 kernel
service can be called from either the process or interrupt environment.
Return Values
The kgetrlimit64 kernel
service has no return values.