1 /* Copyright (C) 1991-2021 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3 
4    The GNU C Library is free software; you can redistribute it and/or
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.
8 
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
12    Lesser General Public License for more details.
13 
14    You should have received a copy of the GNU Lesser General Public
15    License along with the GNU C Library; if not, see
16    <https://www.gnu.org/licenses/>.  */
17 
18 #ifndef _SYS_VLIMIT_H
19 #define _SYS_VLIMIT_H	1
20 
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.  */
62 extern int vlimit (enum __vlimit_resource __resource, int __value) __THROW;
63 
64 
65 __END_DECLS
66 
67 #endif /* sys/vlimit.h  */