memory_object_terminate.html   [plain text]


<h2>memory_object_terminate</h2>
<hr>
<p>
<strong>Server Interface</strong> - Relinquish access to a memory object.
<h3>SYNOPSIS</h3>
<pre>
<strong>kern_return_t   memory_object_terminate</strong>
                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
                 <strong>memory_object_control_t</strong>         <var>memory_control</var><strong>);</strong>



<strong>kern_return_t   seqnos_memory_object_terminate</strong>
                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
                 <strong>mach_port_seqno_t</strong>                        <var>seqno</var>,
                 <strong>memory_object_control_t</strong>         <var>memory_control</var><strong>);</strong>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>memory_object</var> 
<dd>
[in abstract-memory-object (receive) right]
The abstract memory
object port that represents the memory object data.
<p>
<dt> <var>seqno</var> 
<dd>
[in scalar]
The sequence number of this message relative to the abstract 
memory object port.
<p>
<dt> <var>memory_control</var> 
<dd>
[in memory-cache-control receive right]
The memory cache control 
port to be used for a response by the memory manager.  If the memory 
object has been supplied to more than one kernel, this parameter
identifies the kernel that is making the call.
</dl>
<h3>DESCRIPTION</h3>
<p>
A <strong>memory_object_terminate</strong> function is called as the
result of a kernel
message notifying a memory manager that no mappings of the specified memory
object remain.  The kernel makes this call to allow the memory
manager to clean 
up data structures associated with the deallocated mappings.
The call provides 
receive rights to the memory cache control port so that the memory manager 
can retrieve any messages it sent into this port before knowing the memory
object was being terminated and then destroy the port.  The kernel also
relinquishes its rights for all memory object ports.
<p>
The kernel terminates a memory object only after all address space mappings of 
the object have been deallocated, or upon explicit request by the memory
manager.
<h3>RETURN VALUES</h3>
<p>
Only generic errors apply.
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="memory_object_destroy.html"><strong>memory_object_destroy</strong></a>,
<a href="mach_port_deallocate.html"><strong>mach_port_deallocate</strong></a>,
<a href="memory_object_server.html"><strong>memory_object_server</strong></a>,
<a href="SMO_server.html"><strong>seqnos_memory_object_server</strong></a>.