---
title: GetAddressRange
framework: Kernel
role: symbol
role_heading: Instance Method
platforms: [driverkit 19.0+, macOS 10.15+]
path: kernel/iobuffermemorydescriptor/3180453-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.documentation/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](kernel/iobuffermemorydescriptor/3180454-setlength.md)
- [IOAddressSegment](driverkit/ioaddresssegment.md)
