]>
Commit | Line | Data |
---|---|---|
9bccf70c | 1 | <h2>memory_object_destroy</h2>\r<hr>\r<p>\r<strong>Function</strong> - Shut down a memory object.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t memory_object_destroy</strong>\r <strong>(memory_object_control_t</strong> <var>memory_control</var>,\r <strong>kern_return_t</strong> <var>reason</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>memory_control</var> \r<dd>\r[in memory-cache-control send right]\rThe memory cache control port \rto be used by the memory manager for cache management requests. \rThis port is provided by the kernel in a <strong>memory_object_init</strong> call.\r<p>\r<dt> <var>reason</var> \r<dd>\r[in scalar]\rAn error code indicating when the object must be destroyed.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>memory_object_destroy</strong> function tells the kernel to shut down the\rspecified memory object. As a result of this call, the kernel\rno longer supports\rpaging activity or any memory object calls on the memory object.\rThe kernel issues \ra <strong>memory_object_terminate</strong> call to pass to the memory\rmanager all rights to \rthe memory object port and the memory control port.\r<p>\rTo ensure that any modified cached data is returned before the object is\rterminated, the memory manager should call <strong>memory_object_lock_request</strong>\rwith\r<var>should_flush</var> set and a \rlock value of <strong>VM_PROT_WRITE</strong> before it makes the \r<strong>memory_object_destroy</strong> call.\r<h3>NOTES</h3>\r<p>\rThe <var>reason</var> code is currently ignored by the kernel.\r<h3>RETURN VALUES</h3>\r<p>\rOnly generic errors apply.\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="memory_object_lock_request.html"><strong>memory_object_lock_request</strong></a>,\r<a href="memory_object_terminate.html"><strong>memory_object_terminate</strong></a>.\r |