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