1*1b191cb5SApple OSS Distributions<h2>memory_object_attr_info</h2> 2*1b191cb5SApple OSS Distributions<hr> 3*1b191cb5SApple OSS Distributions<p> 4*1b191cb5SApple OSS Distributions<strong>Structure</strong> - Specifies memory object's behavior attributes. 5*1b191cb5SApple OSS Distributions<h3>SYNOPSIS</h3> 6*1b191cb5SApple OSS Distributions<pre> 7*1b191cb5SApple OSS Distributions<strong>struct memory_object_attr_info</strong> 8*1b191cb5SApple OSS Distributions<strong>{</strong> 9*1b191cb5SApple OSS Distributions <strong>memory_object_copy_strategy_t</strong> <var>copy_strategy</var><strong>;</strong> 10*1b191cb5SApple OSS Distributions <strong>vm_offset_t</strong> <var>cluster_size</var><strong>;</strong> 11*1b191cb5SApple OSS Distributions <strong>boolean_t</strong> <var>may_cache</var><strong>;</strong> 12*1b191cb5SApple OSS Distributions <strong>boolean_t</strong> <var>temporary</var><strong>;</strong> 13*1b191cb5SApple OSS Distributions<strong>};</strong> 14*1b191cb5SApple OSS Distributions 15*1b191cb5SApple OSS Distributions<strong>typedef struct memory_object_attr_info* memory_object_attr_info_t;</strong> 16*1b191cb5SApple OSS Distributions</pre> 17*1b191cb5SApple OSS Distributions<h3>FIELDS</h3> 18*1b191cb5SApple OSS Distributions<dl> 19*1b191cb5SApple OSS Distributions<dt> <var>copy_strategy</var> 20*1b191cb5SApple OSS Distributions<dd> 21*1b191cb5SApple OSS DistributionsHow the kernel should handle copying of regions associated with the 22*1b191cb5SApple OSS Distributionsmemory object. The copy strategy cannot be changed once an object is 23*1b191cb5SApple OSS Distributionsinitialized. Valid values are: 24*1b191cb5SApple OSS Distributions<dl> 25*1b191cb5SApple OSS Distributions<p> 26*1b191cb5SApple OSS Distributions<dt> <strong>MEMORY_OBJECT_COPY_NONE</strong> 27*1b191cb5SApple OSS Distributions<dd> 28*1b191cb5SApple OSS DistributionsUse normal procedure when copying the memory object's 29*1b191cb5SApple OSS Distributionsdata. Normally, the kernel requests each page with read 30*1b191cb5SApple OSS Distributionsaccess, copies the data, and then (optionally) flushes the data. 31*1b191cb5SApple OSS Distributions<p> 32*1b191cb5SApple OSS Distributions<dt> <strong>MEMORY_OBJECT_COPY_CALL</strong> 33*1b191cb5SApple OSS Distributions<dd> 34*1b191cb5SApple OSS DistributionsCall the memory manager when a copy operation is necessary. 35*1b191cb5SApple OSS Distributions<p> 36*1b191cb5SApple OSS Distributions<dt> <strong>MEMORY_OBJECT_COPY_DELAY</strong> 37*1b191cb5SApple OSS Distributions<dd> 38*1b191cb5SApple OSS DistributionsUse copy-on-write technique. This strategy allows the kernel 39*1b191cb5SApple OSS Distributionsto efficiently copy large amounts of data and guarantees that 40*1b191cb5SApple OSS Distributionsthe memory manager will not externally modify the data. It is 41*1b191cb5SApple OSS Distributionsthe most commonly used copy strategy. 42*1b191cb5SApple OSS Distributions<p> 43*1b191cb5SApple OSS Distributions<dt> <strong>MEMORY_OBJECT_COPY_TEMPORARY</strong> 44*1b191cb5SApple OSS Distributions<dd> 45*1b191cb5SApple OSS DistributionsAll changes are made in memory and the memory manager does not need 46*1b191cb5SApple OSS Distributionsto see them. 47*1b191cb5SApple OSS Distributions<p> 48*1b191cb5SApple OSS Distributions<dt> <strong>MEMORY_OBJECT_COPY_SYMMETRIC</strong> 49*1b191cb5SApple OSS Distributions<dd> 50*1b191cb5SApple OSS DistributionsThe memory manager does not change the data, does not need to see 51*1b191cb5SApple OSS Distributionsany changes to the data, and will prevent the object from being 52*1b191cb5SApple OSS Distributionsmapped more than once. Currently, this strategy should be restricted 53*1b191cb5SApple OSS Distributionsto use by the kernel. 54*1b191cb5SApple OSS Distributions</dl> 55*1b191cb5SApple OSS Distributions<p> 56*1b191cb5SApple OSS Distributions<dt> <var>cluster_size</var> 57*1b191cb5SApple OSS Distributions<dd> 58*1b191cb5SApple OSS DistributionsThe memory object's perferred cluster size (in bytes). This value may affect 59*1b191cb5SApple OSS Distributionsthe number of pages transferred in a given paging operation. 60*1b191cb5SApple OSS Distributions<p> 61*1b191cb5SApple OSS Distributions<dt> <var>may_cache</var> 62*1b191cb5SApple OSS Distributions<dd> 63*1b191cb5SApple OSS DistributionsCache indicator. If true, the kernel can cache data associated with the 64*1b191cb5SApple OSS Distributionsmemory object (keep the memory object active) even if no virtual 65*1b191cb5SApple OSS Distributionsmemory references to it remain. 66*1b191cb5SApple OSS Distributions<p> 67*1b191cb5SApple OSS Distributions<dt> <var>temporary</var> 68*1b191cb5SApple OSS Distributions<dd> 69*1b191cb5SApple OSS DistributionsIf TRUE, when the last mapping to the object is released, 70*1b191cb5SApple OSS Distributionsthe kernel destroys the object without returning any resident pages. 71*1b191cb5SApple OSS Distributions</dl> 72*1b191cb5SApple OSS Distributions<h3>DESCRIPTION</h3> 73*1b191cb5SApple OSS Distributions<p> 74*1b191cb5SApple OSS DistributionsThe <strong>memory_object_attr_info</strong> structure defines behavior and 75*1b191cb5SApple OSS Distributionsperformance relevant memory object attributes. 76*1b191cb5SApple OSS Distributions<h3>RELATED INFORMATION</h3> 77*1b191cb5SApple OSS Distributions<p> 78*1b191cb5SApple OSS DistributionsFunctions: 79*1b191cb5SApple OSS Distributions<a href="MO_get_attributes.html"><strong>memory_object_get_attributes</strong></a>, 80*1b191cb5SApple OSS Distributions<a href="MO_change_attributes.html"><strong>memory_object_change_attributes</strong></a>, 81*1b191cb5SApple OSS Distributions<a href="vm_region.html"><strong>vm_region</strong></a>, 82*1b191cb5SApple OSS Distributions<a href="memory_object_synchronize.html"><strong>memory_object_synchronize</strong></a>, 83*1b191cb5SApple OSS Distributions<a href="VSD_memory_manager.html"><strong>vm_set_default_memory_manager</strong></a>, 84*1b191cb5SApple OSS Distributions<a href="vm_msync.html"><strong>vm_msync</strong></a>. 85