---
title: initWithOptions
framework: kernel
role: symbol
role_heading: Instance Method
path: kernel/iomemorydescriptor/1441969-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);
```

## Return Value

Return Value true on success, false on failure.

## Discussion

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

## See Also

### Creating the Memory Buffer

- [initWithOptions](kernel/iomemorydescriptor/1812826-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)
