From: Stathis Kamperis Date: Tue, 26 May 2009 11:11:54 +0000 (+0300) Subject: Add missing definition for RLIMIT_AS resource. X-Git-Tag: v2.3.2~45^2^2~5 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/a874e0b7827b04e8d4e0d2454639e2fd9aa33220 Add missing definition for RLIMIT_AS resource. Dragonfly-bug: --- diff --git a/lib/libc/sys/getrlimit.2 b/lib/libc/sys/getrlimit.2 index a946f5b2c0..a92c820ec3 100644 --- a/lib/libc/sys/getrlimit.2 +++ b/lib/libc/sys/getrlimit.2 @@ -62,6 +62,14 @@ The .Fa resource parameter is one of the following: .Bl -tag -width RLIMIT_FSIZEAA +.It Li RLIMIT_AS +The maximum size (in bytes) of a process' total available memory. +If this limit is exceeded, the +.Xr malloc 3 +and +.Xr mmap 2 functions will fail and errno set to +.Dv ENOMEM . +Moreover, the automatic stack growth will fail as well. .It Li RLIMIT_CORE The largest size (in bytes) .Xr core 5 diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 03b152ef30..22fe84273c 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -95,6 +95,7 @@ struct rusage { #define RLIMIT_NOFILE 8 /* number of open files */ #define RLIMIT_SBSIZE 9 /* maximum size of all socket buffers */ #define RLIMIT_VMEM 10 /* virtual process size (inclusive of mmap) */ +#define RLIMIT_AS RLIMIT_VMEM /* standard name for address space size */ #define RLIMIT_POSIXLOCKS 11 /* maximum number of POSIX locks per user */ #define RLIM_NLIMITS 12 /* number of resource limits */