]>
Commit | Line | Data |
---|---|---|
b168057a | 1 | /* Copyright (C) 1991-2015 Free Software Foundation, Inc. |
54d79e99 | 2 | This file is part of the GNU C Library. |
28f540f4 | 3 | |
54d79e99 | 4 | The GNU C Library is free software; you can redistribute it and/or |
41bdb6e2 AJ |
5 | modify it under the terms of the GNU Lesser General Public |
6 | License as published by the Free Software Foundation; either | |
7 | version 2.1 of the License, or (at your option) any later version. | |
28f540f4 | 8 | |
54d79e99 UD |
9 | The GNU C Library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 12 | Lesser General Public License for more details. |
28f540f4 | 13 | |
41bdb6e2 | 14 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
15 | License along with the GNU C Library; if not, see |
16 | <http://www.gnu.org/licenses/>. */ | |
28f540f4 RM |
17 | |
18 | #ifndef _SYS_VLIMIT_H | |
28f540f4 | 19 | #define _SYS_VLIMIT_H 1 |
5107cf1d | 20 | |
28f540f4 RM |
21 | #include <features.h> |
22 | ||
23 | __BEGIN_DECLS | |
24 | ||
25 | /* This interface is obsolete, and is superseded by <sys/resource.h>. */ | |
26 | ||
27 | /* Kinds of resource limit. */ | |
28 | enum __vlimit_resource | |
29 | { | |
30 | /* Setting this non-zero makes it impossible to raise limits. | |
31 | Only the super-use can set it to zero. | |
32 | ||
33 | This is not implemented in recent versions of BSD, nor by | |
34 | the GNU C library. */ | |
35 | LIM_NORAISE, | |
36 | ||
37 | /* CPU time available for each process (seconds). */ | |
38 | LIM_CPU, | |
39 | ||
40 | /* Largest file which can be created (bytes). */ | |
41 | LIM_FSIZE, | |
42 | ||
43 | /* Maximum size of the data segment (bytes). */ | |
44 | LIM_DATA, | |
45 | ||
46 | /* Maximum size of the stack segment (bytes). */ | |
47 | LIM_STACK, | |
48 | ||
49 | /* Largest core file that will be created (bytes). */ | |
50 | LIM_CORE, | |
51 | ||
52 | /* Resident set size (bytes). */ | |
53 | LIM_MAXRSS | |
54 | }; | |
55 | ||
56 | /* This means no limit. */ | |
57 | #define INFINITY 0x7fffffff | |
58 | ||
59 | ||
60 | /* Set the soft limit for RESOURCE to be VALUE. | |
61 | Returns 0 for success, -1 for failure. */ | |
c1422e5b | 62 | extern int vlimit (enum __vlimit_resource __resource, int __value) __THROW; |
28f540f4 RM |
63 | |
64 | ||
65 | __END_DECLS | |
66 | ||
5107cf1d | 67 | #endif /* sys/vlimit.h */ |