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