]>
Commit | Line | Data |
---|---|---|
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> | |
21 | How the kernel should handle copying of regions associated with the | |
22 | memory object. The copy strategy cannot be changed once an object is | |
23 | initialized. Valid values are: | |
24 | <dl> | |
25 | <p> | |
26 | <dt> <strong>MEMORY_OBJECT_COPY_NONE</strong> | |
27 | <dd> | |
28 | Use normal procedure when copying the memory object's | |
29 | data. Normally, the kernel requests each page with read | |
30 | access, copies the data, and then (optionally) flushes the data. | |
31 | <p> | |
32 | <dt> <strong>MEMORY_OBJECT_COPY_CALL</strong> | |
33 | <dd> | |
34 | Call the memory manager when a copy operation is necessary. | |
35 | <p> | |
36 | <dt> <strong>MEMORY_OBJECT_COPY_DELAY</strong> | |
37 | <dd> | |
38 | Use copy-on-write technique. This strategy allows the kernel | |
39 | to efficiently copy large amounts of data and guarantees that | |
40 | the memory manager will not externally modify the data. It is | |
41 | the most commonly used copy strategy. | |
42 | <p> | |
43 | <dt> <strong>MEMORY_OBJECT_COPY_TEMPORARY</strong> | |
44 | <dd> | |
45 | All changes are made in memory and the memory manager does not need | |
46 | to see them. | |
47 | <p> | |
48 | <dt> <strong>MEMORY_OBJECT_COPY_SYMMETRIC</strong> | |
49 | <dd> | |
50 | The memory manager does not change the data, does not need to see | |
51 | any changes to the data, and will prevent the object from being | |
52 | mapped more than once. Currently, this strategy should be restricted | |
53 | to use by the kernel. | |
54 | </dl> | |
55 | <p> | |
56 | <dt> <var>cluster_size</var> | |
57 | <dd> | |
58 | The memory object's perferred cluster size (in bytes). This value may affect | |
59 | the number of pages transferred in a given paging operation. | |
60 | <p> | |
61 | <dt> <var>may_cache</var> | |
62 | <dd> | |
63 | Cache indicator. If true, the kernel can cache data associated with the | |
64 | memory object (keep the memory object active) even if no virtual | |
65 | memory references to it remain. | |
66 | <p> | |
67 | <dt> <var>temporary</var> | |
68 | <dd> | |
69 | If TRUE, when the last mapping to the object is released, | |
70 | the kernel destroys the object without returning any resident pages. | |
71 | </dl> | |
72 | <h3>DESCRIPTION</h3> | |
73 | <p> | |
74 | The <strong>memory_object_attr_info</strong> structure defines behavior and | |
75 | performance relevant memory object attributes. | |
76 | <h3>RELATED INFORMATION</h3> | |
77 | <p> | |
78 | Functions: | |
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>. |