## default_pager_add_segment

Server Interface - Add additional backing storage for a default pager.

### SYNOPSIS

    #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);

### PARAMETERS

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.

### DESCRIPTION

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).

### RETURN VALUES

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.

### RELATED INFORMATION

Functions: default_pager_backing_store_create, default_pager_backing_store_delete, default_pager_backing_store_info.