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