---
title: Create
framework: driverkit
role: symbol
role_heading: Static Method
path: driverkit/iobuffermemorydescriptor/create
---

# Create

Creates a new memory buffer descriptor object in the current process space.

## Declaration

```occ
static kern_return_t Create(uint64_t options, uint64_t capacity, uint64_t alignment, IOBufferMemoryDescriptor **memory);
```

## Parameters

- `options`: The direction in which buffer data moves, relative to your process. For example, specify doc://com.apple.driverkit/documentation/DriverKit/kIOMemoryDirectionIn if your driver only reads from the buffer. For a list of possible values, see Memory Buffer Options.
- `capacity`: The maximum number of bytes to allocate for the memory buffer. The buffer’s initial length is set to the value in this parameter. You can change the length later by calling the doc://com.apple.driverkit/documentation/DriverKit/IOBufferMemoryDescriptor/SetLength method.
- `alignment`: The minimum required alignment of the buffer in bytes. For example, specify 256 to align the buffer on an address where bits 0 to 7 are 0. Specify 0 if you don’t require a specific alignment.
- `memory`: A variable in which to store the newly created buffer memory descriptor.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## See Also

### Creating a Memory Buffer

- [init](driverkit/iobuffermemorydescriptor/init.md)
- [free](driverkit/iobuffermemorydescriptor/free.md)
