]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach_debug/vm_info.h
xnu-792.tar.gz
[apple/xnu.git] / osfmk / mach_debug / vm_info.h
CommitLineData
1c79356b 1/*
91447636 2 * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
1c79356b
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
e5568f75
A
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
1c79356b
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
e5568f75
A
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.
1c79356b
A
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22/*
23 * @OSF_COPYRIGHT@
24 */
25/*
26 * Mach Operating System
27 * Copyright (c) 1991,1990 Carnegie Mellon University
28 * All Rights Reserved.
29 *
30 * Permission to use, copy, modify and distribute this software and its
31 * documentation is hereby granted, provided that both the copyright
32 * notice and this permission notice appear in all copies of the
33 * software, derivative works or modified versions, and any portions
34 * thereof, and that both notices appear in supporting documentation.
35 *
36 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
37 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
38 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
39 *
40 * Carnegie Mellon requests users of this software to return to
41 *
42 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
43 * School of Computer Science
44 * Carnegie Mellon University
45 * Pittsburgh PA 15213-3890
46 *
47 * any improvements or extensions that they make and grant Carnegie Mellon
48 * the rights to redistribute these changes.
49 */
50/*
51 */
52/*
53 * File: mach_debug/vm_info.h
54 * Author: Rich Draves
55 * Date: March, 1990
56 *
57 * Definitions for the VM debugging interface.
58 */
59
60#ifndef _MACH_DEBUG_VM_INFO_H_
61#define _MACH_DEBUG_VM_INFO_H_
62
63#include <mach/boolean.h>
64#include <mach/machine/vm_types.h>
65#include <mach/vm_inherit.h>
66#include <mach/vm_prot.h>
67#include <mach/memory_object_types.h>
68
91447636
A
69#if __DARWIN_ALIGN_POWER
70#pragma options align=power
71#endif
72
1c79356b
A
73/*
74 * Remember to update the mig type definitions
75 * in mach_debug_types.defs when adding/removing fields.
76 */
91447636
A
77typedef struct mach_vm_info_region {
78 mach_vm_offset_t vir_start; /* start of region */
79 mach_vm_offset_t vir_end; /* end of region */
80 mach_vm_offset_t vir_object; /* the mapped object(kernal addr) */
81 memory_object_offset_t vir_offset; /* offset into object */
82 boolean_t vir_needs_copy; /* does object need to be copied? */
83 vm_prot_t vir_protection; /* protection code */
84 vm_prot_t vir_max_protection; /* maximum protection */
85 vm_inherit_t vir_inheritance; /* inheritance */
86 natural_t vir_wired_count; /* number of times wired */
87 natural_t vir_user_wired_count; /* number of times user has wired */
88} mach_vm_info_region_t;
89
1c79356b 90typedef struct vm_info_region_64 {
91447636
A
91 natural_t vir_start; /* start of region */
92 natural_t vir_end; /* end of region */
93 natural_t vir_object; /* the mapped object */
94 memory_object_offset_t vir_offset; /* offset into object */
1c79356b
A
95 boolean_t vir_needs_copy; /* does object need to be copied? */
96 vm_prot_t vir_protection; /* protection code */
97 vm_prot_t vir_max_protection; /* maximum protection */
98 vm_inherit_t vir_inheritance; /* inheritance */
99 natural_t vir_wired_count; /* number of times wired */
100 natural_t vir_user_wired_count; /* number of times user has wired */
101} vm_info_region_64_t;
102
103typedef struct vm_info_region {
91447636
A
104 natural_t vir_start; /* start of region */
105 natural_t vir_end; /* end of region */
106 natural_t vir_object; /* the mapped object */
107 natural_t vir_offset; /* offset into object */
1c79356b
A
108 boolean_t vir_needs_copy; /* does object need to be copied? */
109 vm_prot_t vir_protection; /* protection code */
110 vm_prot_t vir_max_protection; /* maximum protection */
111 vm_inherit_t vir_inheritance; /* inheritance */
112 natural_t vir_wired_count; /* number of times wired */
113 natural_t vir_user_wired_count; /* number of times user has wired */
114} vm_info_region_t;
115
116
117typedef struct vm_info_object {
91447636
A
118 natural_t vio_object; /* this object */
119 natural_t vio_size; /* object size (valid if internal - but too small) */
1c79356b
A
120 unsigned int vio_ref_count; /* number of references */
121 unsigned int vio_resident_page_count; /* number of resident pages */
122 unsigned int vio_absent_count; /* number requested but not filled */
91447636
A
123 natural_t vio_copy; /* copy object */
124 natural_t vio_shadow; /* shadow object */
125 natural_t vio_shadow_offset; /* offset into shadow object */
126 natural_t vio_paging_offset; /* offset into memory object */
1c79356b
A
127 memory_object_copy_strategy_t vio_copy_strategy;
128 /* how to handle data copy */
129 vm_offset_t vio_last_alloc; /* offset of last allocation */
130 /* many random attributes */
131 unsigned int vio_paging_in_progress;
132 boolean_t vio_pager_created;
133 boolean_t vio_pager_initialized;
134 boolean_t vio_pager_ready;
135 boolean_t vio_can_persist;
136 boolean_t vio_internal;
137 boolean_t vio_temporary;
138 boolean_t vio_alive;
91447636
A
139 boolean_t vio_purgable;
140 boolean_t vio_purgable_volatile;
1c79356b
A
141} vm_info_object_t;
142
143typedef vm_info_object_t *vm_info_object_array_t;
144
91447636
A
145#if __DARWIN_ALIGN_POWER
146#pragma options align=reset
147#endif
148
1c79356b 149#endif /* _MACH_DEBUG_VM_INFO_H_ */