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