forked from apple/darwin-xnu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault_pager_add_segment.html
80 lines (79 loc) · 2.84 KB
/
default_pager_add_segment.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<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< mach/default_pager_object.h></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>.