1*2c2f96dcSApple OSS Distributions<h2>default_pager_add_segment</h2> 2*2c2f96dcSApple OSS Distributions<hr> 3*2c2f96dcSApple OSS Distributions<p> 4*2c2f96dcSApple OSS Distributions<strong>Server Interface</strong> - Add additional backing storage for a default pager. 5*2c2f96dcSApple OSS Distributions<h3>SYNOPSIS</h3> 6*2c2f96dcSApple OSS Distributions<pre> 7*2c2f96dcSApple OSS Distributions<strong>#include< mach/default_pager_object.h></strong> 8*2c2f96dcSApple OSS Distributions 9*2c2f96dcSApple OSS Distributions<strong>kern_return_t default_pager_add_segment</strong> 10*2c2f96dcSApple OSS Distributions <strong>(mach_port_t</strong> <var>backing_store</var>, 11*2c2f96dcSApple OSS Distributions <strong>mach_port_t</strong> <var>device</var>, 12*2c2f96dcSApple OSS Distributions <strong>recnum_t</strong> <var>offset</var>, 13*2c2f96dcSApple OSS Distributions <strong>recnum_t</strong> <var>count</var>, 14*2c2f96dcSApple OSS Distributions <strong>int</strong> <var>record_size</var><strong>);</strong> 15*2c2f96dcSApple OSS Distributions</pre> 16*2c2f96dcSApple OSS Distributions<h3>PARAMETERS</h3> 17*2c2f96dcSApple OSS Distributions<dl> 18*2c2f96dcSApple OSS Distributions<p> 19*2c2f96dcSApple OSS Distributions<dt> <var>backing_store</var> 20*2c2f96dcSApple OSS Distributions<dd> 21*2c2f96dcSApple OSS Distributions[in backing store (receive) right] The backing store port. 22*2c2f96dcSApple OSS Distributions<p> 23*2c2f96dcSApple OSS Distributions<dt> <var>device</var> 24*2c2f96dcSApple OSS Distributions<dd> 25*2c2f96dcSApple OSS Distributions[in device port] The port for the device containing the backing storage 26*2c2f96dcSApple OSS Distributionspartition. 27*2c2f96dcSApple OSS Distributions<p> 28*2c2f96dcSApple OSS Distributions<dt> <var>offset</var> 29*2c2f96dcSApple OSS Distributions<dd> 30*2c2f96dcSApple OSS Distributions[in scalar] The offset, in <var>record_size units</var>, to the beginning of the 31*2c2f96dcSApple OSS Distributionsbacking storage on the device. 32*2c2f96dcSApple OSS Distributions<p> 33*2c2f96dcSApple OSS Distributions<dt> <var>count</var> 34*2c2f96dcSApple OSS Distributions<dd> 35*2c2f96dcSApple OSS Distributions[in scalar] The number of <var>record_size</var> units 36*2c2f96dcSApple OSS Distributionsin the partition/segment. 37*2c2f96dcSApple OSS Distributions<p> 38*2c2f96dcSApple OSS Distributions<dt> <var>record_size</var> 39*2c2f96dcSApple OSS Distributions<dd> 40*2c2f96dcSApple OSS Distributions[in scalar] The size, in bytes, of the storage device record. 41*2c2f96dcSApple OSS Distributions</dl> 42*2c2f96dcSApple OSS Distributions<h3>DESCRIPTION</h3> 43*2c2f96dcSApple OSS Distributions<p> 44*2c2f96dcSApple OSS DistributionsThe <strong>default_pager_add_segment</strong> function is called to add a partition to 45*2c2f96dcSApple OSS Distributionsa default pager's backing storage (i.e. expand the amount of backing 46*2c2f96dcSApple OSS Distributionsstorage available to a memory manager). The kernel does not make 47*2c2f96dcSApple OSS Distributionsthis call itself (which is why it can be a synchronous call); this 48*2c2f96dcSApple OSS Distributionsrequest is only issued by tasks holding the backing store port, 49*2c2f96dcSApple OSS Distributionscreated with <strong>default_pager_backing_store_create</strong>, for a default memory 50*2c2f96dcSApple OSS Distributionsmanager. 51*2c2f96dcSApple OSS DistributionsThe result is that the pager may use count records on device starting 52*2c2f96dcSApple OSS Distributionsat offset for paging, and each record is record_size bytes in length 53*2c2f96dcSApple OSS Distributions(note that the device_* calls are, or can be, record oriented). 54*2c2f96dcSApple OSS Distributions<h3>RETURN VALUES</h3> 55*2c2f96dcSApple OSS Distributions<dl> 56*2c2f96dcSApple OSS Distributions<p> 57*2c2f96dcSApple OSS Distributions<dt> <strong>KERN_FAILURE</strong> 58*2c2f96dcSApple OSS Distributions<dd> 59*2c2f96dcSApple OSS DistributionsThe default pager does not support this operation. 60*2c2f96dcSApple OSS Distributions<p> 61*2c2f96dcSApple OSS Distributions<dt> <strong>KERN_INVALID_ARGUMENT</strong> 62*2c2f96dcSApple OSS Distributions<dd> 63*2c2f96dcSApple OSS DistributionsThe <var>backing_store</var> port does not represent a valid backing store or the 64*2c2f96dcSApple OSS Distributionsspecified segment overlaps an existing partition. 65*2c2f96dcSApple OSS Distributions<p> 66*2c2f96dcSApple OSS Distributions<dt> <strong>KERN_RESOURCE_SHORTAGE</strong> 67*2c2f96dcSApple OSS Distributions<dd> 68*2c2f96dcSApple OSS DistributionsThe default pager is unable to allocate internal resources 69*2c2f96dcSApple OSS Distributions to manage the new backing storage. 70*2c2f96dcSApple OSS Distributions<p> 71*2c2f96dcSApple OSS Distributions<dt> <strong>KERN_SUCCESS</strong> 72*2c2f96dcSApple OSS Distributions<dd> 73*2c2f96dcSApple OSS DistributionsThe operation was successful. 74*2c2f96dcSApple OSS Distributions</dl> 75*2c2f96dcSApple OSS Distributions<h3>RELATED INFORMATION</h3> 76*2c2f96dcSApple OSS Distributions<p> 77*2c2f96dcSApple OSS DistributionsFunctions: 78*2c2f96dcSApple OSS Distributions<a href="DP_backing_store_create.html"><strong>default_pager_backing_store_create</strong></a>, 79*2c2f96dcSApple OSS Distributions<a href="DP_backing_store_delete.html"><strong>default_pager_backing_store_delete</strong></a>, 80*2c2f96dcSApple OSS Distributions<a href="DP_backing_store_info.html"><strong>default_pager_backing_store_info</strong></a>. 81