]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/default_pager_add_segment.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / default_pager_add_segment.html
1 <h2>default_pager_add_segment</h2>
2 <hr>
3 <p>
4 <strong>Server Interface</strong> - Add additional backing storage for a default pager.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>#include&lt mach/default_pager_object.h&gt</strong>
8
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>
15 </pre>
16 <h3>PARAMETERS</h3>
17 <dl>
18 <p>
19 <dt> <var>backing_store</var>
20 <dd>
21 [in backing store (receive) right] The backing store port.
22 <p>
23 <dt> <var>device</var>
24 <dd>
25 [in device port] The port for the device containing the backing storage
26 partition.
27 <p>
28 <dt> <var>offset</var>
29 <dd>
30 [in scalar] The offset, in <var>record_size units</var>, to the beginning of the
31 backing storage on the device.
32 <p>
33 <dt> <var>count</var>
34 <dd>
35 [in scalar] The number of <var>record_size</var> units
36 in the partition/segment.
37 <p>
38 <dt> <var>record_size</var>
39 <dd>
40 [in scalar] The size, in bytes, of the storage device record.
41 </dl>
42 <h3>DESCRIPTION</h3>
43 <p>
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
50 manager.
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>
55 <dl>
56 <p>
57 <dt> <strong>KERN_FAILURE</strong>
58 <dd>
59 The default pager does not support this operation.
60 <p>
61 <dt> <strong>KERN_INVALID_ARGUMENT</strong>
62 <dd>
63 The <var>backing_store</var> port does not represent a valid backing store or the
64 specified segment overlaps an existing partition.
65 <p>
66 <dt> <strong>KERN_RESOURCE_SHORTAGE</strong>
67 <dd>
68 The default pager is unable to allocate internal resources
69 to manage the new backing storage.
70 <p>
71 <dt> <strong>KERN_SUCCESS</strong>
72 <dd>
73 The operation was successful.
74 </dl>
75 <h3>RELATED INFORMATION</h3>
76 <p>
77 Functions:
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>.