---
title: withRange
framework: kernel
role: pseudoSymbol
path: kernel/iodevicememory/1811085-withrange
---

# withRange

Constructs an IODeviceMemory instance, describing one physical range.

## Declaration

```occ
static IODeviceMemory * withRange( 
 IOPhysicalAddressaddress, 
 IOPhysicalLengthwithLength ); 
```

## Parameters

- `address`: The physical address of the first byte in the memory.
- `withLength`: The length of memory.

## Return Value

Return Value Returns the created IODeviceMemory on success, to be released by the caller, or zero on failure.

## Overview

Overview This method creates an IODeviceMemory instance for one physical range passed as a physical address and length. It just calls IOMemoryDescriptor::withPhysicalAddress.

## See Also

### Miscellaneous

- [arrayFromList](kernel/iodevicememory/1811066-arrayfromlist.md)
- [withSubRange](kernel/iodevicememory/1811112-withsubrange.md)
