2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
26 * Mach Operating System
27 * Copyright (c) 1991,1990 Carnegie Mellon University
28 * All Rights Reserved.
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.
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.
40 * Carnegie Mellon requests users of this software to return to
42 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
43 * School of Computer Science
44 * Carnegie Mellon University
45 * Pittsburgh PA 15213-3890
47 * any improvements or extensions that they make and grant Carnegie Mellon
48 * the rights to redistribute these changes.
53 * File: mach_debug/vm_info.h
57 * Definitions for the VM debugging interface.
60 #ifndef _MACH_DEBUG_VM_INFO_H_
61 #define _MACH_DEBUG_VM_INFO_H_
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>
70 * Remember to update the mig type definitions
71 * in mach_debug_types.defs when adding/removing fields.
73 typedef struct vm_info_region_64
{
74 vm_offset_t vir_start
; /* start of region */
75 vm_offset_t vir_end
; /* end of region */
76 vm_offset_t vir_object
; /* the mapped object */
77 vm_object_offset_t vir_offset
; /* offset into object */
78 boolean_t vir_needs_copy
; /* does object need to be copied? */
79 vm_prot_t vir_protection
; /* protection code */
80 vm_prot_t vir_max_protection
; /* maximum protection */
81 vm_inherit_t vir_inheritance
; /* inheritance */
82 natural_t vir_wired_count
; /* number of times wired */
83 natural_t vir_user_wired_count
; /* number of times user has wired */
84 } vm_info_region_64_t
;
86 typedef struct vm_info_region
{
87 vm_offset_t vir_start
; /* start of region */
88 vm_offset_t vir_end
; /* end of region */
89 vm_offset_t vir_object
; /* the mapped object */
90 vm_offset_t vir_offset
; /* offset into object */
91 boolean_t vir_needs_copy
; /* does object need to be copied? */
92 vm_prot_t vir_protection
; /* protection code */
93 vm_prot_t vir_max_protection
; /* maximum protection */
94 vm_inherit_t vir_inheritance
; /* inheritance */
95 natural_t vir_wired_count
; /* number of times wired */
96 natural_t vir_user_wired_count
; /* number of times user has wired */
100 typedef struct vm_info_object
{
101 vm_offset_t vio_object
; /* this object */
102 vm_size_t vio_size
; /* object size (valid if internal) */
103 unsigned int vio_ref_count
; /* number of references */
104 unsigned int vio_resident_page_count
; /* number of resident pages */
105 unsigned int vio_absent_count
; /* number requested but not filled */
106 vm_offset_t vio_copy
; /* copy object */
107 vm_offset_t vio_shadow
; /* shadow object */
108 vm_offset_t vio_shadow_offset
; /* offset into shadow object */
109 vm_offset_t vio_paging_offset
; /* offset into memory object */
110 memory_object_copy_strategy_t vio_copy_strategy
;
111 /* how to handle data copy */
112 vm_offset_t vio_last_alloc
; /* offset of last allocation */
113 /* many random attributes */
114 unsigned int vio_paging_in_progress
;
115 boolean_t vio_pager_created
;
116 boolean_t vio_pager_initialized
;
117 boolean_t vio_pager_ready
;
118 boolean_t vio_can_persist
;
119 boolean_t vio_internal
;
120 boolean_t vio_temporary
;
122 boolean_t vio_lock_in_progress
;
123 boolean_t vio_lock_restart
;
126 typedef vm_info_object_t
*vm_info_object_array_t
;
128 #endif /* _MACH_DEBUG_VM_INFO_H_ */