]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/memory_object_attr_info.html
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / man / memory_object_attr_info.html
CommitLineData
9bccf70c 1<h2>memory_object_attr_info</h2>\r<hr>\r<p>\r<strong>Structure</strong> - Specifies memory object's behavior attributes.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>struct memory_object_attr_info</strong>\r<strong>{</strong>\r <strong>memory_object_copy_strategy_t</strong> <var>copy_strategy</var><strong>;</strong>\r <strong>vm_offset_t</strong> <var>cluster_size</var><strong>;</strong>\r <strong>boolean_t</strong> <var>may_cache</var><strong>;</strong>\r <strong>boolean_t</strong> <var>temporary</var><strong>;</strong>\r<strong>};</strong>\r\r<strong>typedef struct memory_object_attr_info* memory_object_attr_info_t;</strong>\r</pre>\r<h3>FIELDS</h3>\r<dl>\r<dt> <var>copy_strategy</var>\r<dd>\rHow the kernel should handle copying of regions associated with the \rmemory object. The copy strategy cannot be changed once an object is \rinitialized. Valid values are:\r<dl>\r<p>\r<dt> <strong>MEMORY_OBJECT_COPY_NONE</strong>\r<dd>\rUse normal procedure when copying the memory object's \rdata. Normally, the kernel requests each page with read\raccess, copies the data, and then (optionally) flushes the data.\r<p>\r<dt> <strong>MEMORY_OBJECT_COPY_CALL</strong>\r<dd>\rCall the memory manager when a copy operation is necessary.\r<p>\r<dt> <strong>MEMORY_OBJECT_COPY_DELAY</strong>\r<dd>\rUse copy-on-write technique. This strategy allows the kernel \rto efficiently copy large amounts of data and guarantees that \rthe memory manager will not externally modify the data. It is \rthe most commonly used copy strategy.\r<p>\r<dt> <strong>MEMORY_OBJECT_COPY_TEMPORARY</strong>\r<dd>\rAll changes are made in memory and the memory manager does not need\rto see them.\r<p>\r<dt> <strong>MEMORY_OBJECT_COPY_SYMMETRIC</strong>\r<dd>\rThe memory manager does not change the data, does not need to see\rany changes to the data, and will prevent the object from being\rmapped more than once. Currently, this strategy should be restricted\rto use by the kernel.\r</dl>\r<p>\r<dt> <var>cluster_size</var>\r<dd>\rThe memory object's perferred cluster size (in bytes). This value may affect\rthe number of pages transferred in a given paging operation.\r<p>\r<dt> <var>may_cache</var>\r<dd>\rCache indicator. If true, the kernel can cache data associated with the \rmemory object (keep the memory object active) even if no virtual \rmemory references to it remain.\r<p>\r<dt> <var>temporary</var>\r<dd>\rIf TRUE, when the last mapping to the object is released,\rthe kernel destroys the object without returning any resident pages.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>memory_object_attr_info</strong> structure defines behavior and\rperformance relevant memory object attributes.\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="MO_get_attributes.html"><strong>memory_object_get_attributes</strong></a>,\r<a href="MO_change_attributes.html"><strong>memory_object_change_attributes</strong></a>,\r<a href="vm_region.html"><strong>vm_region</strong></a>,\r<a href="memory_object_synchronize.html"><strong>memory_object_synchronize</strong></a>,\r<a href="VSD_memory_manager.html"><strong>vm_set_default_memory_manager</strong></a>,\r<a href="vm_msync.html"><strong>vm_msync</strong></a>.\r