---
title: getPhysicalSegment
framework: kernel
role: symbol
role_heading: Instance Method
path: kernel/iomemorydescriptor/1442068-getphysicalsegment
---

# getPhysicalSegment

Break a memory descriptor into its physically contiguous segments.

## Declaration

```occ
virtual addr64_t getPhysicalSegment(IOByteCount offset, IOByteCount *length, IOOptionBits options);
```

## 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.
- `options`: Additional options.

## Return Value

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

## Discussion

Discussion 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

### Getting the Memory Pages

- [getPageCounts](kernel/iomemorydescriptor/1812787-getpagecounts.md)
- [getPageCounts](kernel/iomemorydescriptor/1441992-getpagecounts.md)
- [getPhysicalAddress](kernel/iomemorydescriptor/1812795-getphysicaladdress.md)
- [getPhysicalAddress](kernel/iomemorydescriptor/1441916-getphysicaladdress.md)
- [getPhysicalSegment](kernel/iomemorydescriptor/1812807-getphysicalsegment.md)
