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