xref: /dflybsd-src/usr.sbin/sysvipcd/limits.h (revision 8265747159d6085c462f06fcb5dcee70b773f66b)
1*82657471SMarkus Pfeiffer /*
2*82657471SMarkus Pfeiffer  * Copyright (c) 1994 Adam Glass and Charles Hannum.  All rights reserved.
3*82657471SMarkus Pfeiffer  * Copyright (c) 2013 Larisa Grigore <larisagrigore@gmail.com>.
4*82657471SMarkus Pfeiffer  *
5*82657471SMarkus Pfeiffer  * Redistribution and use in source and binary forms, with or without
6*82657471SMarkus Pfeiffer  * modification, are permitted provided that the following conditions
7*82657471SMarkus Pfeiffer  * are met:
8*82657471SMarkus Pfeiffer  * 1. Redistributions of source code must retain the above copyright
9*82657471SMarkus Pfeiffer  *    notice, this list of conditions and the following disclaimer.
10*82657471SMarkus Pfeiffer  * 2. Redistributions in binary form must reproduce the above copyright
11*82657471SMarkus Pfeiffer  *    notice, this list of conditions and the following disclaimer in the
12*82657471SMarkus Pfeiffer  *    documentation and/or other materials provided with the distribution.
13*82657471SMarkus Pfeiffer  * 3. All advertising materials mentioning features or use of this software
14*82657471SMarkus Pfeiffer  *    must display the following acknowledgement:
15*82657471SMarkus Pfeiffer  *	This product includes software developed by Adam Glass and Charles
16*82657471SMarkus Pfeiffer  *	Hannum.
17*82657471SMarkus Pfeiffer  * 4. The names of the authors may not be used to endorse or promote products
18*82657471SMarkus Pfeiffer  *    derived from this software without specific prior written permission.
19*82657471SMarkus Pfeiffer  *
20*82657471SMarkus Pfeiffer  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
21*82657471SMarkus Pfeiffer  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22*82657471SMarkus Pfeiffer  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23*82657471SMarkus Pfeiffer  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24*82657471SMarkus Pfeiffer  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25*82657471SMarkus Pfeiffer  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26*82657471SMarkus Pfeiffer  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27*82657471SMarkus Pfeiffer  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28*82657471SMarkus Pfeiffer  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29*82657471SMarkus Pfeiffer  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30*82657471SMarkus Pfeiffer  */
31*82657471SMarkus Pfeiffer 
32*82657471SMarkus Pfeiffer #ifndef SYSVD_LIMITS_H
33*82657471SMarkus Pfeiffer #define SYSVD_LIMITS_H
34*82657471SMarkus Pfeiffer 
35*82657471SMarkus Pfeiffer /*
36*82657471SMarkus Pfeiffer  * Tuneable values
37*82657471SMarkus Pfeiffer  */
38*82657471SMarkus Pfeiffer #ifndef SHMMIN
39*82657471SMarkus Pfeiffer #define	SHMMIN	1
40*82657471SMarkus Pfeiffer #endif
41*82657471SMarkus Pfeiffer #ifndef SHMMNI
42*82657471SMarkus Pfeiffer #define	SHMMNI	512 * 4 /* 512 for each type of sysv resource plus the
43*82657471SMarkus Pfeiffer 			   segments used for UNDO operations (sysv sems).
44*82657471SMarkus Pfeiffer 			   */
45*82657471SMarkus Pfeiffer #endif
46*82657471SMarkus Pfeiffer #ifndef SHMSEG
47*82657471SMarkus Pfeiffer #define	SHMSEG	1024
48*82657471SMarkus Pfeiffer #endif
49*82657471SMarkus Pfeiffer 
50*82657471SMarkus Pfeiffer struct shminfo {
51*82657471SMarkus Pfeiffer //	long	shmmax,		/* max shared memory segment size (bytes) */
52*82657471SMarkus Pfeiffer 	long	shmmin,		/* min shared memory segment size (bytes) */
53*82657471SMarkus Pfeiffer 		shmmni,		/* max number of shared memory identifiers */
54*82657471SMarkus Pfeiffer 		shmseg;		/* max shared memory segments per process */
55*82657471SMarkus Pfeiffer //		shmall;		/* max amount of shared memory (pages) */
56*82657471SMarkus Pfeiffer };
57*82657471SMarkus Pfeiffer 
58*82657471SMarkus Pfeiffer #endif
59