---
title: getSegments
framework: kernel
role: pseudoSymbol
path: kernel/iofwphysicaladdressspace/1812956-getsegments
---

# getSegments

Returns the scatter gather list of memory segments from the IODMACommand used in this PhysicalAddressSpace.

## Declaration

```occ
inline IOReturn getSegments(
 UInt64 *offset,
 FWSegment *fw_segments,
 UInt32 *num_segments ) ;
```

## Parameters

- `offset`: input/output parameter, defines the starting and ending offset in the memory descriptor, relative to any offset passed to the prepare() method. FWSegment Points to an array of memory segments. num_segments Size of the FWSegment array.

## Return Value

Return Value returns kIOReturnSuccess on success

## See Also

### Miscellaneous

- [checkMemoryInRange](kernel/iofwphysicaladdressspace/1812923-checkmemoryinrange.md)
- [complete](kernel/iofwphysicaladdressspace/1812928-complete.md)
- [doRead](kernel/iofwphysicaladdressspace/1812935-doread.md)
- [doWrite](kernel/iofwphysicaladdressspace/1812940-dowrite.md)
- [getDMACommand](kernel/iofwphysicaladdressspace/1812943-getdmacommand.md)
- [getLength](kernel/iofwphysicaladdressspace/1812947-getlength.md)
- [getMemoryDescriptor](kernel/iofwphysicaladdressspace/1812953-getmemorydescriptor.md)
- [init](kernel/iofwphysicaladdressspace/1812960-init.md)
- [initWithDesc](kernel/iofwphysicaladdressspace/1812962-initwithdesc.md)
- [initWithDMACommand](kernel/iofwphysicaladdressspace/1812968-initwithdmacommand.md)
- [isPrepared](kernel/iofwphysicaladdressspace/1812974-isprepared.md)
- [prepare](kernel/iofwphysicaladdressspace/1812981-prepare.md)
- [setDMACommand](kernel/iofwphysicaladdressspace/1812990-setdmacommand.md)
- [setMemoryDescriptor](kernel/iofwphysicaladdressspace/1813001-setmemorydescriptor.md)
- [synchronize](kernel/iofwphysicaladdressspace/1813014-synchronize.md)
