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