|
|
1.1 root 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:31 wsanchez
29: * Import of Mac OS X kernel (~semeria)
30: *
31: * Revision 1.1.1.1 1998/03/07 02:25:46 wsanchez
32: * Import of OSF Mach kernel (~mburg)
33: *
34: * Revision 1.1.5.1 1995/01/16 17:22:27 bolinger
35: * Import files unchanged from osc1.3b11 into cnmk_shared.
36: * [1995/01/16 17:20:37 bolinger]
37: *
38: * Revision 1.1.3.2 1993/10/05 22:23:22 watkins
39: * Merge forward.
40: * [1993/10/05 22:05:05 watkins]
41: *
42: * Revision 1.1.1.2 1993/09/28 19:42:50 watkins
43: * Created to comply with spec.
44: *
45: * $EndLog$
46: */
47: /*
48: * File: mach/vm_region.h
49: *
50: * Define the attributes of a task's memory region
51: *
52: */
53:
54: #ifndef _MACH_VM_REGION_H_
55: #define _MACH_VM_REGION_H_
56:
57: #include <mach/boolean.h>
58: #include <mach/vm_prot.h>
59: #include <mach/vm_inherit.h>
60: #include <mach/vm_behavior.h>
61:
62: /*
63: * Types defined:
64: *
65: * vm_region_info_t memory region attributes
66: */
67:
68: #define VM_REGION_INFO_MAX (1024)
69: typedef int *vm_region_info_t;
70: typedef int vm_region_flavor_t;
71: typedef int vm_region_info_data_t[VM_REGION_INFO_MAX];
72:
73: #define VM_REGION_BASIC_INFO 10
74:
75: struct vm_region_basic_info {
76: vm_prot_t protection;
77: vm_prot_t max_protection;
78: vm_inherit_t inheritance;
79: boolean_t shared;
80: boolean_t reserved;
81: vm_offset_t offset;
82: vm_behavior_t behavior;
83: unsigned short user_wired_count;
84: };
85:
86: typedef struct vm_region_basic_info *vm_region_basic_info_t;
87: typedef struct vm_region_basic_info vm_region_basic_info_data_t;
88:
89: #define VM_REGION_BASIC_INFO_COUNT \
90: (sizeof(vm_region_basic_info_data_t)/sizeof(int))
91:
92:
93:
94: #define VM_REGION_EXTENDED_INFO 11
95:
96: #define SM_COW 1
97: #define SM_PRIVATE 2
98: #define SM_EMPTY 3
99: #define SM_SHARED 4
100: #define SM_TRUESHARED 5
101: #define SM_PRIVATE_ALIASED 6
102: #define SM_SHARED_ALIASED 7
103:
104:
105: struct vm_region_extended_info {
106: vm_prot_t protection;
107: unsigned int user_tag;
108: unsigned int pages_resident;
109: unsigned int pages_shared_now_private;
110: unsigned int pages_swapped_out;
111: unsigned int pages_referenced;
112: unsigned int ref_count;
113: unsigned short shadow_depth;
114: unsigned char external_pager;
115: unsigned char share_mode;
116: };
117:
118: typedef struct vm_region_extended_info *vm_region_extended_info_t;
119: typedef struct vm_region_extended_info vm_region_extended_info_data_t;
120:
121: #define VM_REGION_EXTENDED_INFO_COUNT \
122: (sizeof(vm_region_extended_info_data_t)/sizeof(int))
123:
124:
125: #define VM_REGION_TOP_INFO 12
126:
127: struct vm_region_top_info {
128: unsigned int obj_id;
129: unsigned int ref_count;
130: unsigned int private_pages_resident;
131: unsigned int shared_pages_resident;
132: unsigned char share_mode;
133: };
134:
135: typedef struct vm_region_top_info *vm_region_top_info_t;
136: typedef struct vm_region_top_info vm_region_top_info_data_t;
137:
138: #define VM_REGION_TOP_INFO_COUNT \
139: (sizeof(vm_region_top_info_data_t)/sizeof(int))
140:
141:
142: struct vm_read_entry {
143: vm_address_t address;
144: vm_size_t size;
145: };
146:
147: #define VM_MAP_ENTRY_MAX (256)
148:
149: typedef struct vm_read_entry vm_read_entry_t[VM_MAP_ENTRY_MAX];
150:
151: #endif /*_MACH_VM_REGION_H_*/
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.