$RodHat_/search
resource limits reference

RLIMIT_AS

Maximum size of the process virtual address space.

Resource number
9
Row in /proc/PID/limits
Max address space
bash ulimit flag
ulimit -v
Unit in /proc/PID/limits
bytes
Group
Memory

What happens at the limit

brk(2), mmap(2) and mremap(2) fail with ENOMEM; stack growth past it gets SIGSEGV.

Error names: ENOMEM.

Virtual size is not memory in use. Runtimes that reserve huge address ranges up front (many garbage-collected languages, and anything using guard regions) can die at a modest `ulimit -v` while using little RAM. Use it as a tripwire on runaway allocation, not as a memory budget.

Check a running process with grep -i "Max address space" /proc/PID/limits, or paste the whole file into the limits reader. Inspect or change one on a live process with prlimit --pid PID(util-linux).

Sources

  1. getrlimit(2), Linux man-pages
  2. proc_pid_limits(5), Linux man-pages

Resource numbers are from asm-generic/resource.h; a few architectures (Alpha, MIPS, SPARC) number some limits differently. The list of syscall cards is matched by name from the card text on this site, not from the kernel source. Spot one that's wrong? Tell Rod.