osfmk/man/default_pager_add_segment.html
Server Interface - Add additional backing storage for a default pager.
**#include< mach/default\_pager\_object.h>**** kern\_return\_t default\_pager\_add\_segment****(mach\_port\_t**backing\_store, **mach\_port\_t** device, **recnum\_t** offset, **recnum\_t** count, **int** record\_size**);**
backing_store[in backing store (receive) right] The backing store port.
device[in device port] The port for the device containing the backing storage partition.
offset[in scalar] The offset, in record_size units, to the beginning of the backing storage on the device.
count[in scalar] The number of record_size units in the partition/segment.
record_size[in scalar] The size, in bytes, of the storage device record.
The default_pager_add_segment 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 default_pager_backing_store_create , 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).
KERN_FAILURE The default pager does not support this operation.
KERN_INVALID_ARGUMENT The backing_store port does not represent a valid backing store or the specified segment overlaps an existing partition.
KERN_RESOURCE_SHORTAGE The default pager is unable to allocate internal resources to manage the new backing storage.
KERN_SUCCESS The operation was successful.
Functions: default_pager_backing_store_create, default_pager_backing_store_delete, default_pager_backing_store_info.