Home

rlimcur

rlimcur is an informal term used to denote the current, or soft, resource limit of a process as defined by the POSIX resource limit interface. It specifically refers to the rlim_cur field within the resource limit structure used by system calls that manage limits.

In POSIX, resource limits are represented by struct rlimit, which contains two members: rlim_cur and rlim_max.

The getrlimit and setrlimit system calls retrieve and modify these limits for a given resource. Examples of

Notes on terminology and portability: rlim_cur is the explicit field name in the standard struct rlimit, and

The
rlim_cur
member
encodes
the
soft
limit—the
value
that
the
kernel
enforces
for
the
corresponding
resource
during
normal
operation.
The
rlim_max
member
encodes
the
hard
limit,
which
is
the
maximum
value
to
which
the
soft
limit
can
be
raised.
The
type
of
these
fields
is
rlim_t,
typically
an
unsigned
integer
large
enough
to
express
the
limit.
A
value
of
RLIM_INFINITY
indicates
that
there
is
no
finite
limit,
depending
on
the
platform.
resources
include
RLIMIT_CPU
(CPU
time),
RLIMIT_FSIZE
(maximum
file
size),
RLIMIT_NOFILE
(maximum
number
of
open
files),
and
RLIMIT_AS
(address
space).
In
practice,
a
process
can
reduce
its
soft
limit,
or
increase
it
up
to
the
hard
limit;
raising
the
soft
limit
beyond
the
hard
limit
is
not
permitted.
The
soft
limit
can
influence
behavior
such
as
when
the
process
receives
signals
or
how
certain
operations
are
constrained,
while
the
hard
limit
remains
a
ceiling
that
can
only
be
raised
by
privileged
code.
rlimcur
is
commonly
used
in
documentation
and
code
as
a
shorthand
for
the
current
limit.
Implementations
and
exact
behavior
can
vary
slightly
across
operating
systems,
but
the
core
concept
remains
consistent:
rlimcur
represents
the
active
soft
limit
that
governs
resource
usage.