---
title: withSpecification
framework: kernel
role: pseudoSymbol
path: kernel/iolittlememorycursor/1812526-withspecification
---

# withSpecification

Creates and initializes an IOLittleMemoryCursor in one operation.

## Declaration

```occ
static IOLittleMemoryCursor * withSpecification(
 IOPhysicalLength maxSegmentSize, 
 IOPhysicalLength maxTransferSize, 
 IOPhysicalLength alignment = 1); 
```

## Parameters

- `maxSegmentSize`: Maximum allowable size for one segment. Defaults to 0.
- `maxTransferSize`: Maximum size of an entire transfer. Defaults to 0 indicating no maximum.
- `alignment`: Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment.

## Return Value

Return Value Returns a new memory cursor if successfully created and initialized, 0 otherwise.

## Overview

Overview Factory function to create and initialize an IOLittleMemoryCursor in one operation. See also IOLittleMemoryCursor::initWithSpecification.

## See Also

### Miscellaneous

- [getPhysicalSegments](kernel/iolittlememorycursor/1812505-getphysicalsegments.md)
- [initWithSpecification](kernel/iolittlememorycursor/1812512-initwithspecification.md)
- [outputSegment](kernel/iolittlememorycursor/1812519-outputsegment.md)
