1<h2>vm_machine_attribute</h2> 2<hr> 3<p> 4<strong>Function</strong> - Get/set the target memory region's special attributes. 5<h3>SYNOPSIS</h3> 6<pre> 7<strong>kern_return_t vm_machine_attribute</strong> 8 <strong>(vm_task_t</strong> <var>target_task</var>, 9 <strong>vm_address_t</strong> <var>address</var>, 10 <strong>vm_size_t</strong> <var>size</var>, 11 <strong>vm_machine_attribute_t</strong> <var>attribute</var>, 12 <strong>vm_machine_attribute_val_t</strong> <var>value</var><strong>);</strong> 13</pre> 14<h3>PARAMETERS</h3> 15<dl> 16<p> 17<dt> <var>target_task</var> 18<dd> 19[in task send right] 20The port for the task in whose address space the 21memory object is to be manipulated. 22<p> 23<dt> <var>address</var> 24<dd> 25[in scalar] 26The starting address for the memory region. The granularity 27of rounding of this value to page boundaries is implementation 28dependent. 29<p> 30<dt> <var>size</var> 31<dd> 32[in scalar] 33The number of bytes in the region. The granularity of 34rounding of this value to page boundaries is implementation dependent. 35<p> 36<dt> <var>attribute</var> 37<dd> 38[in scalar] 39The name of the attribute to be get/set. Possible values are: 40<dl> 41<p> 42<dt> <strong>MATTR_CACHE</strong> 43<dd> 44Cachability. Aside from the generic values listed below, the 45following special values are defined: 46<dl> 47<p> 48<dt> <strong>MATTR_VAL_CACHE_FLUSH</strong> 49<dd> 50Flush from all caches 51<p> 52<dt> <strong>MATTR_VAL_DCACHE_FLUSH</strong> 53<dd> 54Flush from data caches 55<p> 56<dt> <strong>MATTR_VAL_ICACHE_FLUSH</strong> 57<dd> 58Flush from instruction caches 59</dl> 60<p> 61<dt> <strong>MATTR_MIGRATE</strong> 62<dd> 63Migratability. 64<p> 65<dt> <strong>MATTR_REPLICATE</strong> 66<dd> 67Replicability. 68</dl> 69<p> 70<dt> <var>value</var> 71<dd> 72[pointer to in/out scalar] 73The new value for the attribute. The old value 74is also returned in this variable. The new value can be a specific value 75listed above, or one of the following generic values: 76<dl> 77<p> 78<dt> <strong>MATTR_VAL_OFF</strong> 79<dd> 80Turn attribute off. 81<p> 82<dt> <strong>MATTR_VAL_ON</strong> 83<dd> 84Turn attribute on. 85<p> 86<dt> <strong>MATTR_VAL_GET</strong> 87<dd> 88No change, just return current value. 89</dl> 90</dl> 91<h3>DESCRIPTION</h3> 92<p> 93The <strong>vm_machine_attribute</strong> function gets and sets special 94attributes of the 95memory region implemented by the underlying <strong>pmap</strong> module. These attributes 96are properties such as cachability, migratability and replicability. 97The behavior of this function is machine dependent. 98<h3>NOTES</h3> 99<p> 100This interface is machine word length specific because of the virtual address 101parameter. 102<h3>RETURN VALUES</h3> 103<dl> 104<p> 105<dt> <strong>KERN_INVALID_ADDRESS</strong> 106<dd> 107The address is illegal or specifies a non-allocated region. 108</dl> 109<h3>RELATED INFORMATION</h3> 110<p> 111Functions: 112<a href="vm_wire.html"><strong>vm_wire</strong></a>. 113