---
title: GetAddressRange
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/iobuffermemorydescriptor/getaddressrange
---

# GetAddressRange

Returns the address and length of the memory buffer.

## Declaration

```occ
kern_return_t GetAddressRange(IOAddressSegment *range);
```

## Parameters

- `range`: An doc://com.apple.driverkit/documentation/DriverKit/IOAddressSegment structure that you provide. On return, this structure contains the address and length of the memory buffer.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## See Also

### Managing the Buffer Contents

- [SetLength](driverkit/iobuffermemorydescriptor/setlength.md)
- [IOAddressSegment](driverkit/ioaddresssegment.md)
