#include <mach/memory_object_types.h> also included by
<mach/mach.h>mach/memory_object_types.h
macroVM_64_BIT_DATA_OBJECTS
#define VM_64_BIT_DATA_OBJECTS
typedefmemory_object_offset_t
typedef unsigned long long memory_object_offset_t
typedefmemory_object_size_t
typedef unsigned long long memory_object_size_t
typedefmemory_object_cluster_size_t
typedef natural_t memory_object_cluster_size_t
typedefmemory_object_fault_info_t
typedef natural_t * memory_object_fault_info_t
typedefvm_object_id_t
typedef unsigned long long vm_object_id_t
typedefmemory_object_t
typedef mach_port_t memory_object_t
typedefmemory_object_control_t
vestigial, maintained for source compatibility,
no MIG interface will accept or return non NULL
objects for those.
typedef mach_port_t memory_object_control_t
typedefmemory_object_array_t
typedef memory_object_t *memory_object_array_t
typedefmemory_object_name_t
typedef mach_port_t memory_object_name_t
typedefmemory_object_default_t
typedef mach_port_t memory_object_default_t
macroMEMORY_OBJECT_NULL
#define MEMORY_OBJECT_NULL ((memory_object_t) 0)
macroMEMORY_OBJECT_CONTROL_NULL
#define MEMORY_OBJECT_CONTROL_NULL ((memory_object_control_t) 0)
macroMEMORY_OBJECT_NAME_NULL
#define MEMORY_OBJECT_NAME_NULL ((memory_object_name_t) 0)
macroMEMORY_OBJECT_DEFAULT_NULL
#define MEMORY_OBJECT_DEFAULT_NULL ((memory_object_default_t) 0)
typedefmemory_object_copy_strategy_t
typedef int memory_object_copy_strategy_t
macroMEMORY_OBJECT_COPY_TEMPORARY
... Memory manager doesn't
change data externally.
#define MEMORY_OBJECT_COPY_TEMPORARY 3
macroMEMORY_OBJECT_COPY_SYMMETRIC
... Memory manager doesn't
change data externally, and
doesn't need to see changes.
#define MEMORY_OBJECT_COPY_SYMMETRIC 4
macroMEMORY_OBJECT_COPY_INVALID
#define MEMORY_OBJECT_COPY_INVALID 5
macroMEMORY_OBJECT_COPY_DELAY_FORK
#define MEMORY_OBJECT_COPY_DELAY_FORK 6
typedefmemory_object_return_t
typedef int memory_object_return_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
| MEMORY_OBJECT_RETURN_NONE | Don't return any pages. If should_flush is TRUE, pages will be discarded. |
| MEMORY_OBJECT_RETURN_DIRTY | Return only dirty (modified) pages. If should_flush is TRUE, precious pages will be discarded; otherwise, the kernel maintains responsibility for precious pages. |
| MEMORY_OBJECT_RETURN_ALL | Both dirty and precious pages are returned. If should_flush is FALSE, the kernel maintains responsibility for the precious pages. |
| MEMORY_OBJECT_RETURN_ANYTHING | Any resident pages are returned. If should_flush is TRUE, precious pages will be discarded; otherwise, the kernel maintains responsibility for precious pages. |
macroMEMORY_OBJECT_RETURN_NONE
Which pages to return to manager
this time (lock_request)
#define MEMORY_OBJECT_RETURN_NONE 0
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Don't return any pages. If should_flush is TRUE, pages will be discarded.
macroMEMORY_OBJECT_RETURN_DIRTY
... don't return any.
#define MEMORY_OBJECT_RETURN_DIRTY 1
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Return only dirty (modified) pages. If should_flush is TRUE, precious pages will be discarded; otherwise, the kernel maintains responsibility for precious pages.
macroMEMORY_OBJECT_RETURN_ALL
... only dirty pages.
#define MEMORY_OBJECT_RETURN_ALL 2
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Both dirty and precious pages are returned. If should_flush is FALSE, the kernel maintains responsibility for the precious pages.
macroMEMORY_OBJECT_RETURN_ANYTHING
... dirty and precious pages.
#define MEMORY_OBJECT_RETURN_ANYTHING 3
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Any resident pages are returned. If should_flush is TRUE, precious pages will be discarded; otherwise, the kernel maintains responsibility for precious pages.
macroMEMORY_OBJECT_DATA_FLUSH
#define MEMORY_OBJECT_DATA_FLUSH 0x1
macroMEMORY_OBJECT_DATA_NO_CHANGE
#define MEMORY_OBJECT_DATA_NO_CHANGE 0x2
macroMEMORY_OBJECT_DATA_PURGE
#define MEMORY_OBJECT_DATA_PURGE 0x4
macroMEMORY_OBJECT_COPY_SYNC
#define MEMORY_OBJECT_COPY_SYNC 0x8
macroMEMORY_OBJECT_DATA_SYNC
#define MEMORY_OBJECT_DATA_SYNC 0x10
macroMEMORY_OBJECT_IO_SYNC
#define MEMORY_OBJECT_IO_SYNC 0x20
macroMEMORY_OBJECT_DATA_FLUSH_ALL
#define MEMORY_OBJECT_DATA_FLUSH_ALL 0x40
macroMEMORY_OBJECT_INFO_MAX
#define MEMORY_OBJECT_INFO_MAX (1024)
typedefmemory_object_info_t
typedef int *memory_object_info_t
typedefmemory_object_flavor_t
typedef int memory_object_flavor_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
| MEMORY_OBJECT_PERFORMANCE_INFO | Performance related attributes such as the cache indicator and the cluster size. attributes should specify a structure of type memory_object_perf_info. |
| MEMORY_OBJECT_BEHAVIOR_INFO | Behavior related attributes such as the copy strategy and sync invalidate flag. attributes should specify a structure of type memory_object_behavior_info. |
| MEMORY_OBJECT_ATTRIBUTES_INFO | Behavior and performance related attributes such as the copy strategy, cache indicator, and cluster size. attributes should specify a structure of type memory_object_attr_info. |
typedefmemory_object_info_data_t
typedef int memory_object_info_data_t[MEMORY_OBJECT_INFO_MAX]
macroMEMORY_OBJECT_PERFORMANCE_INFO
#define MEMORY_OBJECT_PERFORMANCE_INFO 11
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Performance related attributes such as the cache indicator and the cluster size. attributes should specify a structure of type memory_object_perf_info.
macroMEMORY_OBJECT_ATTRIBUTE_INFO
#define MEMORY_OBJECT_ATTRIBUTE_INFO 14
macroMEMORY_OBJECT_BEHAVIOR_INFO
#define MEMORY_OBJECT_BEHAVIOR_INFO 15
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Behavior related attributes such as the copy strategy and sync invalidate flag. attributes should specify a structure of type memory_object_behavior_info.
structmemory_object_perf_info
| memory_object_cluster_size_t | cluster_size | |
| boolean_t | may_cache |
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Specifies a memory object's attributes with respect to performance.
The memory_object_perf_info structure defines a memory object's character with respect to performance.
Notes. Sharing cached data among all the clients of a memory object can have a major impact on performance, especially if it can be extended across successive, as well as concurrent, uses. For example, the memory objects that represent program images can be used regularly by different programs. By retaining the data for these memory objects in cache, the number of secondary storage accesses can be reduced significantly.
structmemory_object_attr_info
| memory_object_copy_strategy_t | copy_strategy | |
| memory_object_cluster_size_t | cluster_size | |
| boolean_t | may_cache_object | |
| boolean_t | temporary |
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Specifies memory object's behavior attributes.
The memory_object_attr_info structure defines behavior and performance relevant memory object attributes.
structmemory_object_behave_info
| memory_object_copy_strategy_t | copy_strategy | |
| boolean_t | temporary | |
| boolean_t | invalidate | |
| boolean_t | silent_overwrite | |
| boolean_t | advisory_pageout |
typedefmemory_object_behave_info_t
typedef struct memory_object_behave_info *memory_object_behave_info_t
typedefmemory_object_behave_info_data_t
typedef struct memory_object_behave_info memory_object_behave_info_data_t
typedefmemory_object_perf_info_t
typedef struct memory_object_perf_info *memory_object_perf_info_t
typedefmemory_object_perf_info_data_t
typedef struct memory_object_perf_info memory_object_perf_info_data_t
typedefmemory_object_attr_info_t
typedef struct memory_object_attr_info *memory_object_attr_info_t
typedefmemory_object_attr_info_data_t
typedef struct memory_object_attr_info memory_object_attr_info_data_t
macroMEMORY_OBJECT_BEHAVE_INFO_COUNT
#define MEMORY_OBJECT_BEHAVE_INFO_COUNT ((mach_msg_type_number_t) (sizeof(memory_object_behave_info_data_t)/sizeof(int)))
macroMEMORY_OBJECT_PERF_INFO_COUNT
#define MEMORY_OBJECT_PERF_INFO_COUNT ((mach_msg_type_number_t) (sizeof(memory_object_perf_info_data_t)/sizeof(int)))
macroMEMORY_OBJECT_ATTR_INFO_COUNT
#define MEMORY_OBJECT_ATTR_INFO_COUNT ((mach_msg_type_number_t) (sizeof(memory_object_attr_info_data_t)/sizeof(int)))
macroinvalid_memory_object_flavor
#define invalid_memory_object_flavor(f) (f != MEMORY_OBJECT_ATTRIBUTE_INFO && f != MEMORY_OBJECT_PERFORMANCE_INFO && f != OLD_MEMORY_OBJECT_BEHAVIOR_INFO && f != MEMORY_OBJECT_BEHAVIOR_INFO && f != OLD_MEMORY_OBJECT_ATTRIBUTE_INFO)
macroMEMORY_OBJECT_TERMINATE_IDLE
Used to support options on memory_object_release_name call
#define MEMORY_OBJECT_TERMINATE_IDLE 0x1
macroMEMORY_OBJECT_RESPECT_CACHE
#define MEMORY_OBJECT_RESPECT_CACHE 0x2
macroMEMORY_OBJECT_RELEASE_NO_OP
#define MEMORY_OBJECT_RELEASE_NO_OP 0x4
macroMAP_MEM_COPYBACK
#define MAP_MEM_COPYBACK 1
macroMAP_MEM_IO
#define MAP_MEM_IO 2
macroMAP_MEM_WTHRU
#define MAP_MEM_WTHRU 3
macroMAP_MEM_POSTED
#define MAP_MEM_POSTED 6
macroMAP_MEM_RT
#define MAP_MEM_RT 7
macroMAP_MEM_POSTED_REORDERED
#define MAP_MEM_POSTED_REORDERED 8
macroMAP_MEM_POSTED_COMBINED_REORDERED
#define MAP_MEM_POSTED_COMBINED_REORDERED 9
macroGET_MAP_MEM
#define GET_MAP_MEM(flags) ((((unsigned int)(flags)) >> 24) & 0xFF)
macroSET_MAP_MEM
#define SET_MAP_MEM(caching, flags) ((flags) = ((((unsigned int)(caching)) << 24) & 0xFF000000) | ((flags) & 0xFFFFFF));
macroMAP_MEM_LEDGER_TAGGED
#define MAP_MEM_LEDGER_TAGGED 0x002000
object owned by a specific task and ledger
macroMAP_MEM_PURGABLE_KERNEL_ONLY
#define MAP_MEM_PURGABLE_KERNEL_ONLY 0x004000
volatility controlled by kernel
macroMAP_MEM_USE_DATA_ADDR
#define MAP_MEM_USE_DATA_ADDR 0x100000
preserve address of data, rather than base of page
macroMAP_MEM_FLAGS_MASK
#define MAP_MEM_FLAGS_MASK 0x00FFFF00
macroMAP_MEM_FLAGS_USER
#define MAP_MEM_FLAGS_USER ( MAP_MEM_PURGABLE_KERNEL_ONLY | MAP_MEM_GRAB_SECLUDED | MAP_MEM_ONLY | MAP_MEM_NAMED_CREATE | MAP_MEM_PURGABLE | MAP_MEM_NAMED_REUSE | MAP_MEM_USE_DATA_ADDR | MAP_MEM_VM_COPY | MAP_MEM_VM_SHARE | MAP_MEM_LEDGER_TAGGED | MAP_MEM_4K_DATA_ADDR)
macroMAP_MEM_FLAGS_ALL
#define MAP_MEM_FLAGS_ALL ( MAP_MEM_FLAGS_USER)