default_pager_add_segment.html   [plain text]


<h2>default_pager_add_segment</h2>
<hr>
<p>
<strong>Server Interface</strong> - Add additional backing storage for a default pager.
<h3>SYNOPSIS</h3>
<pre>
<strong>#include&lt mach/default_pager_object.h&gt</strong>

<strong>kern_return_t   default_pager_add_segment</strong>
                <strong>(mach_port_t</strong>                      <var>backing_store</var>,
                 <strong>mach_port_t</strong>                             <var>device</var>,
                 <strong>recnum_t</strong>                                <var>offset</var>,
                 <strong>recnum_t</strong>                                 <var>count</var>,
                 <strong>int</strong>                                <var>record_size</var><strong>);</strong>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>backing_store</var>
<dd>
[in backing store (receive) right] The backing store port.
<p>
<dt> <var>device</var>
<dd>
[in device port] The port for the device containing the backing storage 
partition.
<p>
<dt> <var>offset</var>
<dd>
[in scalar] The offset, in <var>record_size units</var>, to the beginning of the
backing storage on the device.
<p>
<dt> <var>count</var>
<dd>
[in scalar] The number of <var>record_size</var> units
in the partition/segment.
<p>
<dt> <var>record_size</var>
<dd>
[in scalar] The size, in bytes, of the storage device record.
</dl>
<h3>DESCRIPTION</h3>
<p>
The <strong>default_pager_add_segment</strong> function is called to add a partition to
a default pager's backing storage (i.e. expand the amount of backing
storage available to a memory manager). The kernel does not make
this call itself (which is why it can be a synchronous call); this
request is only issued by tasks holding the backing store port,
created with <strong>default_pager_backing_store_create</strong>, for a default memory
manager.
The result is that the pager may use count records on device starting
at offset for paging, and each record is record_size bytes in length
(note that the device_* calls are, or can be, record oriented).
<h3>RETURN VALUES</h3>
<dl>
<p>
<dt> <strong>KERN_FAILURE</strong>
<dd>
The default pager does not support this operation.
<p>
<dt> <strong>KERN_INVALID_ARGUMENT</strong>
<dd>
The <var>backing_store</var> port does not represent a valid backing store or the 
specified segment overlaps an existing partition.
<p>
<dt> <strong>KERN_RESOURCE_SHORTAGE</strong>
<dd>
The default pager is unable to allocate internal resources
     to manage the new backing storage.
<p>
<dt> <strong>KERN_SUCCESS</strong>
<dd>
The operation was successful.
</dl>
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="DP_backing_store_create.html"><strong>default_pager_backing_store_create</strong></a>,
<a href="DP_backing_store_delete.html"><strong>default_pager_backing_store_delete</strong></a>,
<a href="DP_backing_store_info.html"><strong>default_pager_backing_store_info</strong></a>.