]> git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/mach_param.h
ce2e9d27cbaee8d4ffd28cede67b4f8d413604be
[apple/xnu.git] / osfmk / kern / mach_param.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 * @OSF_COPYRIGHT@
24 */
25 /*
26 * HISTORY
27 *
28 * Revision 1.1.1.1 1998/09/22 21:05:34 wsanchez
29 * Import of Mac OS X kernel (~semeria)
30 *
31 * Revision 1.1.1.1 1998/03/07 02:25:55 wsanchez
32 * Import of OSF Mach kernel (~mburg)
33 *
34 * Revision 1.1.9.1 1994/09/23 02:22:28 ezf
35 * change marker to not FREE
36 * [1994/09/22 21:34:35 ezf]
37 *
38 * Revision 1.1.7.1 1994/01/12 17:54:33 dwm
39 * Coloc: initial restructuring to follow Utah model.
40 * added various maxima for act/thread_pool zones
41 * [1994/01/12 17:29:08 dwm]
42 *
43 * Revision 1.1.3.3 1993/06/07 22:13:58 jeffc
44 * CR9176 - ANSI C violations: trailing tokens on CPP
45 * directives, extra semicolons after decl_ ..., asm keywords
46 * [1993/06/07 19:06:04 jeffc]
47 *
48 * Revision 1.1.3.2 1993/06/02 23:38:46 jeffc
49 * Added to OSF/1 R1.3 from NMK15.0.
50 * [1993/06/02 21:13:30 jeffc]
51 *
52 * Revision 1.1 1992/09/30 02:29:52 robert
53 * Initial revision
54 *
55 * $EndLog$
56 */
57 /* CMU_HIST */
58 /*
59 * Revision 2.5.2.1 92/03/03 16:20:11 jeffreyh
60 * 19-Feb-92 David L. Black (dlb) at Open Software Foundation
61 * Double object slop in PORT_MAX, allow for extra (non-task)
62 * ipc spaces (e.g. ipc_space_remote) in SPACE_MAX
63 * [92/02/26 11:54:50 jeffreyh]
64 *
65 * Revision 2.5 91/05/14 16:44:25 mrt
66 * Correcting copyright
67 *
68 * Revision 2.4 91/02/05 17:27:56 mrt
69 * Changed to new Mach copyright
70 * [91/02/01 16:15:07 mrt]
71 *
72 * Revision 2.3 90/06/02 14:55:13 rpd
73 * Added new IPC parameters.
74 * [90/03/26 22:11:55 rpd]
75 *
76 *
77 * Condensed history:
78 * Moved TASK_MAX, PORT_MAX, etc. here from mach/mach_param.h (rpd).
79 */
80 /* CMU_ENDHIST */
81 /*
82 * Mach Operating System
83 * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
84 * All Rights Reserved.
85 *
86 * Permission to use, copy, modify and distribute this software and its
87 * documentation is hereby granted, provided that both the copyright
88 * notice and this permission notice appear in all copies of the
89 * software, derivative works or modified versions, and any portions
90 * thereof, and that both notices appear in supporting documentation.
91 *
92 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
93 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
94 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
95 *
96 * Carnegie Mellon requests users of this software to return to
97 *
98 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
99 * School of Computer Science
100 * Carnegie Mellon University
101 * Pittsburgh PA 15213-3890
102 *
103 * any improvements or extensions that they make and grant Carnegie Mellon
104 * the rights to redistribute these changes.
105 */
106 /*
107 */
108 /*
109 * File: kern/mach_param.h
110 * Author: Avadis Tevanian, Jr., Michael Wayne Young
111 * Date: 1986
112 *
113 * Mach system sizing parameters
114 *
115 */
116
117 #ifndef _KERN_MACH_PARAM_H_
118 #define _KERN_MACH_PARAM_H_
119
120 #define THREAD_MAX 1024 /* Max number of threads */
121 #define THREAD_CHUNK 64 /* Allocation chunk */
122
123 #define TASK_MAX 1024 /* Max number of tasks */
124 #define TASK_CHUNK 64 /* Allocation chunk */
125
126 #define ACT_MAX 1024 /* Max number of acts */
127 #define ACT_CHUNK 64 /* Allocation chunk */
128
129 #define THREAD_POOL_MAX 1024 /* Max number of thread_pools */
130 #define THREAD_POOL_CHUNK 64 /* Allocation chunk */
131
132 #define PORT_MAX ((TASK_MAX * 3 + THREAD_MAX) /* kernel */ \
133 + (THREAD_MAX * 2) /* user */ \
134 + 40000) /* slop for objects */
135 /* Number of ports, system-wide */
136
137 #define SET_MAX (TASK_MAX + THREAD_MAX + 200)
138 /* Max number of port sets */
139
140 #define ITE_MAX (1 << 16) /* Max number of splay tree entries */
141
142 #define SPACE_MAX (TASK_MAX + 5) /* Max number of IPC spaces */
143
144 #define SEMAPHORE_MAX (PORT_MAX >> 1) /* Maximum number of semaphores */
145
146 #endif /* _KERN_MACH_PARAM_H_ */