---
title: withAddress
framework: kernel
role: pseudoSymbol
path: kernel/iomemorydescriptor/1812881-withaddress
---

# withAddress

Creates an IOMemoryDescriptor to describe one virtual range of the kernel task.

## Declaration

```occ
static IOMemoryDescriptor * withAddress(
 void *address, 
 IOByteCountwithLength, 
 IODirectionwithDirection); 
```

## Parameters

- `address`: The virtual address of the first byte in the memory.
- `withLength`: The length of memory.
- `withDirection`: An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.

## Return Value

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

## Overview

Overview This method creates and initializes an IOMemoryDescriptor for memory consisting of a single virtual memory range mapped into the kernel map. This memory descriptor needs to be prepared before it can be used to extract data from the memory described.

## See Also

### Creating the Memory Buffer

- [initWithOptions](kernel/iomemorydescriptor/1812826-initwithoptions.md)
- [initWithOptions](kernel/iomemorydescriptor/1441969-initwithoptions.md)
- [withOptions](kernel/iomemorydescriptor/1812897-withoptions.md)
- [withOptions](kernel/iomemorydescriptor/1441825-withoptions.md)
- [withAddress](kernel/iomemorydescriptor/1442032-withaddress.md)
- [withAddressRange](kernel/iomemorydescriptor/1812885-withaddressrange.md)
- [withAddressRange](kernel/iomemorydescriptor/1441897-withaddressrange.md)
- [withAddressRanges](kernel/iomemorydescriptor/1812892-withaddressranges.md)
- [withAddressRanges](kernel/iomemorydescriptor/1441794-withaddressranges.md)
- [withPersistentMemoryDescriptor](kernel/iomemorydescriptor/1812901-withpersistentmemorydescriptor.md)
- [withPersistentMemoryDescriptor](kernel/iomemorydescriptor/1441983-withpersistentmemorydescriptor.md)
- [withPhysicalAddress](kernel/iomemorydescriptor/1812908-withphysicaladdress.md)
- [withPhysicalAddress](kernel/iomemorydescriptor/1441877-withphysicaladdress.md)
- [free](driverkit/iomemorydescriptor/free.md)
