#include <mach/memory_object_types.h> also included by <mach/mach.h>

mach/memory_object_types.h

61 macros · 21 typedefs · 3 structs

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_NONE

How memory manager handles copy:
#define MEMORY_OBJECT_COPY_NONE 0

macroMEMORY_OBJECT_COPY_CALL

... No special support
#define MEMORY_OBJECT_COPY_CALL 1

macroMEMORY_OBJECT_COPY_DELAY

... Make call on memory manager
#define MEMORY_OBJECT_COPY_DELAY 2

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_NONEDon't return any pages. If should_flush is TRUE, pages will be discarded.
MEMORY_OBJECT_RETURN_DIRTYReturn 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_ALLBoth dirty and precious pages are returned. If should_flush is FALSE, the kernel maintains responsibility for the precious pages.
MEMORY_OBJECT_RETURN_ANYTHINGAny 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_INFOPerformance 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_INFOBehavior 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_INFOBehavior 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

size 8, align 4
memory_object_cluster_size_tcluster_size
boolean_tmay_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

size 16, align 4
memory_object_copy_strategy_tcopy_strategy
memory_object_cluster_size_tcluster_size
boolean_tmay_cache_object
boolean_ttemporary
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

size 20, align 4
memory_object_copy_strategy_tcopy_strategy
boolean_ttemporary
boolean_tinvalidate
boolean_tsilent_overwrite
boolean_tadvisory_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_NOOP

named entry processor mapping options enumerated
#define MAP_MEM_NOOP 0

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_WCOMB

#define MAP_MEM_WCOMB 4
Write combining mode

macroMAP_MEM_INNERWBACK

aka store gather
#define MAP_MEM_INNERWBACK 5

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_PROT_MASK

leave room for vm_prot bits (0xFF ?)
#define MAP_MEM_PROT_MASK 0xFF

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_GRAB_SECLUDED

#define MAP_MEM_GRAB_SECLUDED 0x008000
can grab secluded pages

macroMAP_MEM_ONLY

#define MAP_MEM_ONLY 0x010000
change processor caching

macroMAP_MEM_NAMED_CREATE

#define MAP_MEM_NAMED_CREATE 0x020000
create extant object

macroMAP_MEM_PURGABLE

#define MAP_MEM_PURGABLE 0x040000
create a purgable VM object

macroMAP_MEM_NAMED_REUSE

#define MAP_MEM_NAMED_REUSE 0x080000
reuse provided entry if identical

macroMAP_MEM_USE_DATA_ADDR

#define MAP_MEM_USE_DATA_ADDR 0x100000
preserve address of data, rather than base of page

macroMAP_MEM_VM_COPY

#define MAP_MEM_VM_COPY 0x200000
make a copy of a VM range

macroMAP_MEM_VM_SHARE

#define MAP_MEM_VM_SHARE 0x400000
extract a VM range for remap

macroMAP_MEM_4K_DATA_ADDR

#define MAP_MEM_4K_DATA_ADDR 0x800000
preserve 4K aligned address of data

macroMAP_MEM_FLAGS_MASK

#define MAP_MEM_FLAGS_MASK 0x00FFFF00

macroMAP_MEM_FLAGS_ALL

#define MAP_MEM_FLAGS_ALL (
	MAP_MEM_FLAGS_USER)