2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
29 * Mach Operating System
30 * Copyright (c) 1991,1990 Carnegie Mellon University
31 * All Rights Reserved.
33 * Permission to use, copy, modify and distribute this software and its
34 * documentation is hereby granted, provided that both the copyright
35 * notice and this permission notice appear in all copies of the
36 * software, derivative works or modified versions, and any portions
37 * thereof, and that both notices appear in supporting documentation.
39 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
40 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
41 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
43 * Carnegie Mellon requests users of this software to return to
45 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
46 * School of Computer Science
47 * Carnegie Mellon University
48 * Pittsburgh PA 15213-3890
50 * any improvements or extensions that they make and grant Carnegie Mellon
51 * the rights to redistribute these changes.
56 * File: mach_debug/vm_info.h
60 * Definitions for the VM debugging interface.
63 #ifndef _MACH_DEBUG_VM_INFO_H_
64 #define _MACH_DEBUG_VM_INFO_H_
66 #include <mach/boolean.h>
67 #include <mach/machine/vm_types.h>
68 #include <mach/vm_inherit.h>
69 #include <mach/vm_prot.h>
70 #include <mach/memory_object_types.h>
73 * Remember to update the mig type definitions
74 * in mach_debug_types.defs when adding/removing fields.
76 typedef struct vm_info_region_64
{
77 vm_offset_t vir_start
; /* start of region */
78 vm_offset_t vir_end
; /* end of region */
79 vm_offset_t vir_object
; /* the mapped object */
80 vm_object_offset_t vir_offset
; /* offset into object */
81 boolean_t vir_needs_copy
; /* does object need to be copied? */
82 vm_prot_t vir_protection
; /* protection code */
83 vm_prot_t vir_max_protection
; /* maximum protection */
84 vm_inherit_t vir_inheritance
; /* inheritance */
85 natural_t vir_wired_count
; /* number of times wired */
86 natural_t vir_user_wired_count
; /* number of times user has wired */
87 } vm_info_region_64_t
;
89 typedef struct vm_info_region
{
90 vm_offset_t vir_start
; /* start of region */
91 vm_offset_t vir_end
; /* end of region */
92 vm_offset_t vir_object
; /* the mapped object */
93 vm_offset_t vir_offset
; /* offset into object */
94 boolean_t vir_needs_copy
; /* does object need to be copied? */
95 vm_prot_t vir_protection
; /* protection code */
96 vm_prot_t vir_max_protection
; /* maximum protection */
97 vm_inherit_t vir_inheritance
; /* inheritance */
98 natural_t vir_wired_count
; /* number of times wired */
99 natural_t vir_user_wired_count
; /* number of times user has wired */
103 typedef struct vm_info_object
{
104 vm_offset_t vio_object
; /* this object */
105 vm_size_t vio_size
; /* object size (valid if internal) */
106 unsigned int vio_ref_count
; /* number of references */
107 unsigned int vio_resident_page_count
; /* number of resident pages */
108 unsigned int vio_absent_count
; /* number requested but not filled */
109 vm_offset_t vio_copy
; /* copy object */
110 vm_offset_t vio_shadow
; /* shadow object */
111 vm_offset_t vio_shadow_offset
; /* offset into shadow object */
112 vm_offset_t vio_paging_offset
; /* offset into memory object */
113 memory_object_copy_strategy_t vio_copy_strategy
;
114 /* how to handle data copy */
115 vm_offset_t vio_last_alloc
; /* offset of last allocation */
116 /* many random attributes */
117 unsigned int vio_paging_in_progress
;
118 boolean_t vio_pager_created
;
119 boolean_t vio_pager_initialized
;
120 boolean_t vio_pager_ready
;
121 boolean_t vio_can_persist
;
122 boolean_t vio_internal
;
123 boolean_t vio_temporary
;
125 boolean_t vio_lock_in_progress
;
126 boolean_t vio_lock_restart
;
129 typedef vm_info_object_t
*vm_info_object_array_t
;
131 #endif /* _MACH_DEBUG_VM_INFO_H_ */