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