Home

RLIMITDATA

RLIMIT_DATA is a per-process resource limit used on many Unix-like systems to cap the size of a process's data segment. The data segment includes the program’s initialized and dynamically allocated data, such as the heap. It does not cover the code segment or the stack. The limit is expressed in bytes and is managed through the standard resource limit interfaces (getrlimit and setrlimit) and can also be viewed or modified via shell utilities such as ulimit.

The limit features soft and hard boundaries. The soft limit can be reached during normal execution, and

Platform variations exist. On many systems, RLIMIT_DATA is available for compatibility but may be limited in

Default values for RLIMIT_DATA vary by system and configuration. In some environments it may be unlimited by

See also RLIMIT_AS, RLIMIT_STACK, getrlimit, setrlimit, and ulimit.

further
growth
of
the
data
segment
(for
example,
by
increasing
the
heap
via
brk/sbrk)
may
fail
with
an
allocation
error
(typically
ENOMEM).
The
hard
limit
controls
the
maximum
value
to
which
the
soft
limit
can
be
raised
and
can
only
be
increased
by
privileged
processes.
If
the
limit
is
exceeded,
the
operating
system
prevents
further
expansion
of
the
data
region.
effect
on
modern
memory
management.
In
Linux,
memory
usage
is
frequently
governed
more
by
RLIMIT_AS
(address
space)
than
by
RLIMIT_DATA,
and
allocations
via
mmap
may
be
outside
the
data
segment
limit.
Some
platforms
may
ignore
RLIMIT_DATA
or
treat
it
differently
in
practice.
default,
while
in
others
it
can
be
restricted
to
help
contain
memory
usage
for
untrusted
or
long-running
processes.
Tools
used
to
enforce
limits
include
setrlimit,
ulimit,
and
related
process-control
mechanisms,
often
employed
in
sandboxing
and
resource-control
contexts.