---
title: IOMemoryCursor
framework: kernel
role: symbol
role_heading: Class
path: kernel/iomemorycursor
---

# IOMemoryCursor

A mechanism to convert memory references to physical addresses.

## Declaration

```occ
class IOMemoryCursor : OSObject
```

## Overview

Overview The IOMemoryCursor declares the super class that all specific memory cursors must inherit from, but a memory cursor can be created without a specific format subclass by just providing a segment function to the initializers. This class does the difficult stuff of dividing a memory descriptor into a physical scatter/gather list appropriate for the target hardware. A driver is expected to create a memory cursor and configure it to the limitations of its DMA hardware; for instance the memory cursor used by the FireWire SBP-2 protocol has a maximum physical segment size of 2^16 - 1 but the actual transfer size is unlimited. Thus it would create a cursor with a maxSegmentSize of 65535 and a maxTransfer size of UINT_MAX. It would also provide a SegmentFunction that can output a pagelist entry. Below is the simplest example of a SegmentFunction: void IONaturalMemoryCursor::outputSegment(PhysicalSegment segment, void * outSegments, UInt32 outSegmentIndex) { ((PhysicalSegment *) outSegments)[outSegmentIndex] = segment; }

## Topics

### Miscellaneous

- [genPhysicalSegments](kernel/iomemorycursor/1812441-genphysicalsegments.md)
- [initWithSpecification](kernel/iomemorycursor/1812445-initwithspecification.md)
- [withSpecification](kernel/iomemorycursor/1812453-withspecification.md)

### Callbacks

- [SegmentFunction](kernel/iodmacommand/segmentfunction.md)

### Constants

- [Miscellaneous Defines](kernel/iomemorycursor/miscellaneous_defines.md)

### DataTypes

- [PhysicalSegment](kernel/iomemorycursor/physicalsegment.md)

### Instance Variables

- [outSeg](kernel/iomemorycursor/outseg.md)
- [maxTransferSize](kernel/iomemorycursor/maxtransfersize.md)
- [maxSegmentSize](kernel/iomemorycursor/maxsegmentsize.md)
- [alignMask](kernel/iomemorycursor/alignmask.md)

### Instance Methods

- [genPhysicalSegments](kernel/iomemorycursor/1400980-genphysicalsegments.md)
- [getMetaClass](kernel/iomemorycursor/1401008-getmetaclass.md)
- [initWithSpecification](kernel/iomemorycursor/1401022-initwithspecification.md)

### Type Methods

- [withSpecification](kernel/iomemorycursor/1400994-withspecification.md)

## Relationships

### Inherits From

- [OSObject](kernel/osobject.md)

## See Also

### Cursors

- [IOBigMemoryCursor](kernel/iobigmemorycursor.md)
- [IOLittleMemoryCursor](kernel/iolittlememorycursor.md)
- [IONaturalMemoryCursor](kernel/ionaturalmemorycursor.md)
