1 <h2>memory_object_destroy
</h2>
4 <strong>Function
</strong> - Shut down a memory object.
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>
14 <dt> <var>memory_control
</var>
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.
21 <dt> <var>reason
</var>
24 An error code indicating when the object must be destroyed.
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
31 paging activity or any memory object calls on the memory object.
33 a
<strong>memory_object_terminate
</strong> call to pass to the memory
35 the memory object port and the memory control port.
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>
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.
45 The
<var>reason
</var> code is currently ignored by the kernel.
46 <h3>RETURN VALUES
</h3>
48 Only generic errors apply.
49 <h3>RELATED INFORMATION
</h3>
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>.