---
title: getPhysicalSegment
framework: kernel
role: pseudoSymbol
path: kernel/iomultimemorydescriptor/1812610-getphysicalsegment
---

# getPhysicalSegment

Break a memory descriptor into its physically contiguous segments.

## Declaration

```occ
virtual addr64_t getPhysicalSegment(
 IOByteCountoffset, 
 IOByteCount *length, 
 IOOptionBits options = 0 ); 
```

## Parameters

- `offset`: A byte offset into the memory whose physical address to return.
- `length`: If non-zero, getPhysicalSegment will store here the length of the physically contiguous segement at the given offset.

## Return Value

Return Value A physical address, or zero if the offset is beyond the length of the memory.

## Overview

Overview This method returns the physical address of the byte at the given offset into the memory, and optionally the length of the physically contiguous segment from that offset.

## See Also

### Miscellaneous

- [complete](kernel/iomultimemorydescriptor/1812588-complete.md)
- [initWithDescriptors](kernel/iomultimemorydescriptor/1812635-initwithdescriptors.md)
- [prepare](kernel/iomultimemorydescriptor/1812660-prepare.md)
- [withDescriptors(IOMemoryDescriptor **, UInt32, IODirection, bool)](kernel/iomultimemorydescriptor/1812685-withdescriptors.md)
- [withDescriptors(IOMemoryDescriptor **, UInt32, IODirection, bool)](kernel/iomultimemorydescriptor/1812714-withdescriptors.md)
