vm_machine_attribute
Function - Get/set the target memory region's special attributes.
SYNOPSIS
kern_return_t vm_machine_attribute
(vm_task_t target_task,
vm_address_t address,
vm_size_t size,
vm_machine_attribute_t attribute,
vm_machine_attribute_val_t value);
PARAMETERS
- target_task
-
[in task send right]
The port for the task in whose address space the
memory object is to be manipulated.
- address
-
[in scalar]
The starting address for the memory region. The granularity
of rounding of this value to page boundaries is implementation
dependent.
- size
-
[in scalar]
The number of bytes in the region. The granularity of
rounding of this value to page boundaries is implementation dependent.
- attribute
-
[in scalar]
The name of the attribute to be get/set. Possible values are:
- MATTR_CACHE
-
Cachability. Aside from the generic values listed below, the
following special values are defined:
- MATTR_VAL_CACHE_FLUSH
-
Flush from all caches
- MATTR_VAL_DCACHE_FLUSH
-
Flush from data caches
- MATTR_VAL_ICACHE_FLUSH
-
Flush from instruction caches
- MATTR_MIGRATE
-
Migratability.
- MATTR_REPLICATE
-
Replicability.
- value
-
[pointer to in/out scalar]
The new value for the attribute. The old value
is also returned in this variable. The new value can be a specific value
listed above, or one of the following generic values:
- MATTR_VAL_OFF
-
Turn attribute off.
- MATTR_VAL_ON
-
Turn attribute on.
- MATTR_VAL_GET
-
No change, just return current value.
DESCRIPTION
The vm_machine_attribute function gets and sets special
attributes of the
memory region implemented by the underlying pmap module. These attributes
are properties such as cachability, migratability and replicability.
The behavior of this function is machine dependent.
NOTES
This interface is machine word length specific because of the virtual address
parameter.
RETURN VALUES
- KERN_INVALID_ADDRESS
-
The address is illegal or specifies a non-allocated region.
RELATED INFORMATION
Functions:
vm_wire.