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