xref: /xnu-10002.61.3/osfmk/man/memory_object_terminate.html (revision 0f4c859e951fba394238ab619495c4e1d54d0f34)
1*0f4c859eSApple OSS Distributions<h2>memory_object_terminate</h2>
2*0f4c859eSApple OSS Distributions<hr>
3*0f4c859eSApple OSS Distributions<p>
4*0f4c859eSApple OSS Distributions<strong>Server Interface</strong> - Relinquish access to 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_terminate</strong>
8*0f4c859eSApple OSS Distributions                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
9*0f4c859eSApple OSS Distributions                 <strong>memory_object_control_t</strong>         <var>memory_control</var><strong>);</strong>
10*0f4c859eSApple OSS Distributions
11*0f4c859eSApple OSS Distributions
12*0f4c859eSApple OSS Distributions
13*0f4c859eSApple OSS Distributions<strong>kern_return_t   seqnos_memory_object_terminate</strong>
14*0f4c859eSApple OSS Distributions                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
15*0f4c859eSApple OSS Distributions                 <strong>mach_port_seqno_t</strong>                        <var>seqno</var>,
16*0f4c859eSApple OSS Distributions                 <strong>memory_object_control_t</strong>         <var>memory_control</var><strong>);</strong>
17*0f4c859eSApple OSS Distributions</pre>
18*0f4c859eSApple OSS Distributions<h3>PARAMETERS</h3>
19*0f4c859eSApple OSS Distributions<dl>
20*0f4c859eSApple OSS Distributions<p>
21*0f4c859eSApple OSS Distributions<dt> <var>memory_object</var>
22*0f4c859eSApple OSS Distributions<dd>
23*0f4c859eSApple OSS Distributions[in abstract-memory-object (receive) right]
24*0f4c859eSApple OSS DistributionsThe abstract memory
25*0f4c859eSApple OSS Distributionsobject port that represents the memory object data.
26*0f4c859eSApple OSS Distributions<p>
27*0f4c859eSApple OSS Distributions<dt> <var>seqno</var>
28*0f4c859eSApple OSS Distributions<dd>
29*0f4c859eSApple OSS Distributions[in scalar]
30*0f4c859eSApple OSS DistributionsThe sequence number of this message relative to the abstract
31*0f4c859eSApple OSS Distributionsmemory object port.
32*0f4c859eSApple OSS Distributions<p>
33*0f4c859eSApple OSS Distributions<dt> <var>memory_control</var>
34*0f4c859eSApple OSS Distributions<dd>
35*0f4c859eSApple OSS Distributions[in memory-cache-control receive right]
36*0f4c859eSApple OSS DistributionsThe memory cache control
37*0f4c859eSApple OSS Distributionsport to be used for a response by the memory manager.  If the memory
38*0f4c859eSApple OSS Distributionsobject has been supplied to more than one kernel, this parameter
39*0f4c859eSApple OSS Distributionsidentifies the kernel that is making the call.
40*0f4c859eSApple OSS Distributions</dl>
41*0f4c859eSApple OSS Distributions<h3>DESCRIPTION</h3>
42*0f4c859eSApple OSS Distributions<p>
43*0f4c859eSApple OSS DistributionsA <strong>memory_object_terminate</strong> function is called as the
44*0f4c859eSApple OSS Distributionsresult of a kernel
45*0f4c859eSApple OSS Distributionsmessage notifying a memory manager that no mappings of the specified memory
46*0f4c859eSApple OSS Distributionsobject remain.  The kernel makes this call to allow the memory
47*0f4c859eSApple OSS Distributionsmanager to clean
48*0f4c859eSApple OSS Distributionsup data structures associated with the deallocated mappings.
49*0f4c859eSApple OSS DistributionsThe call provides
50*0f4c859eSApple OSS Distributionsreceive rights to the memory cache control port so that the memory manager
51*0f4c859eSApple OSS Distributionscan retrieve any messages it sent into this port before knowing the memory
52*0f4c859eSApple OSS Distributionsobject was being terminated and then destroy the port.  The kernel also
53*0f4c859eSApple OSS Distributionsrelinquishes its rights for all memory object ports.
54*0f4c859eSApple OSS Distributions<p>
55*0f4c859eSApple OSS DistributionsThe kernel terminates a memory object only after all address space mappings of
56*0f4c859eSApple OSS Distributionsthe object have been deallocated, or upon explicit request by the memory
57*0f4c859eSApple OSS Distributionsmanager.
58*0f4c859eSApple OSS Distributions<h3>RETURN VALUES</h3>
59*0f4c859eSApple OSS Distributions<p>
60*0f4c859eSApple OSS DistributionsOnly generic errors apply.
61*0f4c859eSApple OSS Distributions<h3>RELATED INFORMATION</h3>
62*0f4c859eSApple OSS Distributions<p>
63*0f4c859eSApple OSS DistributionsFunctions:
64*0f4c859eSApple OSS Distributions<a href="memory_object_destroy.html"><strong>memory_object_destroy</strong></a>,
65*0f4c859eSApple OSS Distributions<a href="mach_port_deallocate.html"><strong>mach_port_deallocate</strong></a>,
66*0f4c859eSApple OSS Distributions<a href="memory_object_server.html"><strong>memory_object_server</strong></a>,
67*0f4c859eSApple OSS Distributions<a href="SMO_server.html"><strong>seqnos_memory_object_server</strong></a>.
68