1 <h2>default_pager_add_segment
</h2>
4 <strong>Server Interface
</strong> - Add additional backing storage for a default pager.
7 <strong>#include< mach/default_pager_object.h>
</strong>
9 <strong>kern_return_t default_pager_add_segment
</strong>
10 <strong>(mach_port_t
</strong> <var>backing_store
</var>,
11 <strong>mach_port_t
</strong> <var>device
</var>,
12 <strong>recnum_t
</strong> <var>offset
</var>,
13 <strong>recnum_t
</strong> <var>count
</var>,
14 <strong>int
</strong> <var>record_size
</var><strong>);
</strong>
19 <dt> <var>backing_store
</var>
21 [in backing store (receive) right] The backing store port.
23 <dt> <var>device
</var>
25 [in device port] The port for the device containing the backing storage
28 <dt> <var>offset
</var>
30 [in scalar] The offset, in
<var>record_size units
</var>, to the beginning of the
31 backing storage on the device.
35 [in scalar] The number of
<var>record_size
</var> units
36 in the partition/segment.
38 <dt> <var>record_size
</var>
40 [in scalar] The size, in bytes, of the storage device record.
44 The
<strong>default_pager_add_segment
</strong> function is called to add a partition to
45 a default pager's backing storage (i.e. expand the amount of backing
46 storage available to a memory manager). The kernel does not make
47 this call itself (which is why it can be a synchronous call); this
48 request is only issued by tasks holding the backing store port,
49 created with
<strong>default_pager_backing_store_create
</strong>, for a default memory
51 The result is that the pager may use count records on device starting
52 at offset for paging, and each record is record_size bytes in length
53 (note that the device_* calls are, or can be, record oriented).
54 <h3>RETURN VALUES
</h3>
57 <dt> <strong>KERN_FAILURE
</strong>
59 The default pager does not support this operation.
61 <dt> <strong>KERN_INVALID_ARGUMENT
</strong>
63 The
<var>backing_store
</var> port does not represent a valid backing store or the
64 specified segment overlaps an existing partition.
66 <dt> <strong>KERN_RESOURCE_SHORTAGE
</strong>
68 The default pager is unable to allocate internal resources
69 to manage the new backing storage.
71 <dt> <strong>KERN_SUCCESS
</strong>
73 The operation was successful.
75 <h3>RELATED INFORMATION
</h3>
78 <a href=
"DP_backing_store_create.html"><strong>default_pager_backing_store_create
</strong></a>,
79 <a href=
"DP_backing_store_delete.html"><strong>default_pager_backing_store_delete
</strong></a>,
80 <a href=
"DP_backing_store_info.html"><strong>default_pager_backing_store_info
</strong></a>.