]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach_debug/zone_info.h
b8f8132e4edb2cd6672bfbbc969d304767bc7d94
[apple/xnu.git] / osfmk / mach_debug / zone_info.h
1 /*
2 * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * @OSF_COPYRIGHT@
25 */
26 /*
27 * Mach Operating System
28 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
29 * All Rights Reserved.
30 *
31 * Permission to use, copy, modify and distribute this software and its
32 * documentation is hereby granted, provided that both the copyright
33 * notice and this permission notice appear in all copies of the
34 * software, derivative works or modified versions, and any portions
35 * thereof, and that both notices appear in supporting documentation.
36 *
37 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
38 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
39 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
40 *
41 * Carnegie Mellon requests users of this software to return to
42 *
43 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
44 * School of Computer Science
45 * Carnegie Mellon University
46 * Pittsburgh PA 15213-3890
47 *
48 * any improvements or extensions that they make and grant Carnegie Mellon
49 * the rights to redistribute these changes.
50 */
51 /*
52 */
53
54 #ifndef _MACH_DEBUG_ZONE_INFO_H_
55 #define _MACH_DEBUG_ZONE_INFO_H_
56
57 #include <mach/boolean.h>
58 #include <mach/machine/vm_types.h>
59
60 /*
61 * Remember to update the mig type definitions
62 * in mach_debug_types.defs when adding/removing fields.
63 */
64
65 #define ZONE_NAME_MAX_LEN 80
66
67 typedef struct zone_name {
68 char zn_name[ZONE_NAME_MAX_LEN];
69 } zone_name_t;
70
71 typedef zone_name_t *zone_name_array_t;
72
73
74 typedef struct zone_info {
75 integer_t zi_count; /* Number of elements used now */
76 natural_t zi_cur_size; /* current memory utilization */
77 natural_t zi_max_size; /* how large can this zone grow */
78 natural_t zi_elem_size; /* size of an element */
79 natural_t zi_alloc_size; /* size used for more memory */
80 integer_t zi_pageable; /* zone pageable? */
81 integer_t zi_sleepable; /* sleep if empty? */
82 integer_t zi_exhaustible; /* merely return if empty? */
83 integer_t zi_collectable; /* garbage collect elements? */
84 } zone_info_t;
85
86 typedef zone_info_t *zone_info_array_t;
87
88 #endif /* _MACH_DEBUG_ZONE_INFO_H_ */