---
title: initWithOptions
framework: kernel
role: pseudoSymbol
path: kernel/iomemorydescriptor/1812826-initwithoptions
---

# initWithOptions

Primary initializer for all variants of memory descriptors.

## Declaration

```occ
virtual bool initWithOptions(
 void *buffers, 
 UInt32 count, 
 UInt32 offset, 
 task_t task, 
 IOOptionBits options, 
 IOMapper *mapper = kIOMapperSystem); 
```

## Return Value

Return Value true on success, false on failure.

## Overview

Overview Note this function can be used to re-init a previously created memory descriptor. For a more complete description see withOptions.

## See Also

### Creating the Memory Buffer

- [initWithOptions](kernel/iomemorydescriptor/1441969-initwithoptions.md)
- [withOptions](kernel/iomemorydescriptor/1812897-withoptions.md)
- [withOptions](kernel/iomemorydescriptor/1441825-withoptions.md)
- [withAddress](kernel/iomemorydescriptor/1812881-withaddress.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)
