]>
Commit | Line | Data |
---|---|---|
13fec989 A |
1 | <h2>memory_object_destroy</h2> |
2 | <hr> | |
3 | <p> | |
4 | <strong>Function</strong> - Shut down a memory object. | |
5 | <h3>SYNOPSIS</h3> | |
6 | <pre> | |
7 | <strong>kern_return_t memory_object_destroy</strong> | |
8 | <strong>(memory_object_control_t</strong> <var>memory_control</var>, | |
9 | <strong>kern_return_t</strong> <var>reason</var><strong>);</strong> | |
10 | </pre> | |
11 | <h3>PARAMETERS</h3> | |
12 | <dl> | |
13 | <p> | |
14 | <dt> <var>memory_control</var> | |
15 | <dd> | |
16 | [in memory-cache-control send right] | |
17 | The memory cache control port | |
18 | to be used by the memory manager for cache management requests. | |
19 | This port is provided by the kernel in a <strong>memory_object_init</strong> call. | |
20 | <p> | |
21 | <dt> <var>reason</var> | |
22 | <dd> | |
23 | [in scalar] | |
24 | An error code indicating when the object must be destroyed. | |
25 | </dl> | |
26 | <h3>DESCRIPTION</h3> | |
27 | <p> | |
28 | The <strong>memory_object_destroy</strong> function tells the kernel to shut down the | |
29 | specified memory object. As a result of this call, the kernel | |
30 | no longer supports | |
31 | paging activity or any memory object calls on the memory object. | |
32 | The kernel issues | |
33 | a <strong>memory_object_terminate</strong> call to pass to the memory | |
34 | manager all rights to | |
35 | the memory object port and the memory control port. | |
36 | <p> | |
37 | To ensure that any modified cached data is returned before the object is | |
38 | terminated, the memory manager should call <strong>memory_object_lock_request</strong> | |
39 | with | |
40 | <var>should_flush</var> set and a | |
41 | lock value of <strong>VM_PROT_WRITE</strong> before it makes the | |
42 | <strong>memory_object_destroy</strong> call. | |
43 | <h3>NOTES</h3> | |
44 | <p> | |
45 | The <var>reason</var> code is currently ignored by the kernel. | |
46 | <h3>RETURN VALUES</h3> | |
47 | <p> | |
48 | Only generic errors apply. | |
49 | <h3>RELATED INFORMATION</h3> | |
50 | <p> | |
51 | Functions: | |
52 | <a href="memory_object_lock_request.html"><strong>memory_object_lock_request</strong></a>, | |
53 | <a href="memory_object_terminate.html"><strong>memory_object_terminate</strong></a>. |