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