<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IOBufferMemoryDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOBufferMemoryDescriptor"
  },
  "title" : "IOBufferMemoryDescriptor"
}
-->

# IOBufferMemoryDescriptor

A memory buffer allocated in the caller’s address space.

```
class IOBufferMemoryDescriptor;
```

## Overview

Use an [`IOBufferMemoryDescriptor`](/documentation/DriverKit/IOBufferMemoryDescriptor) to share data between your driver and other processes, including the kernel. You create memory buffers in your driver’s process space, but you can pass the buffer to any API that expects an [`IOMemoryDescriptor`](/documentation/DriverKit/IOMemoryDescriptor) object. Some DriverKit APIs pass your buffer to another process, which can then map the buffer to its own address space and access the contents.

Typically, you create memory buffer objects to store data moving in and out of your driver. For example, a network interface driver might create a buffer to store packet data it receives from the associated device. You are responsible for managing the contents of the buffer yourself, typically by mapping it to a known data type. Except where noted, you are also responsible for releasing buffers that you allocate.

## Topics

### Creating a Memory Buffer

[`static kern_return_t Create(uint64_t options, uint64_t capacity, uint64_t alignment, IOBufferMemoryDescriptor **memory);`](/documentation/DriverKit/IOBufferMemoryDescriptor/Create)

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

[`virtual bool init();`](/documentation/DriverKit/IOBufferMemoryDescriptor/init)

Initializes the buffer memory descriptor object.

[`virtual void free();`](/documentation/DriverKit/IOBufferMemoryDescriptor/free)

Performs any final cleanup for the memory buffer descriptor object.

### Managing the Buffer Contents

[`virtual kern_return_t SetLength(uint64_t length);`](/documentation/DriverKit/IOBufferMemoryDescriptor/SetLength)

Changes the length of the memory buffer.

[`kern_return_t GetAddressRange(IOAddressSegment *range);`](/documentation/DriverKit/IOBufferMemoryDescriptor/GetAddressRange)

Returns the address and length of the memory buffer.

[`struct IOAddressSegment;`](/documentation/DriverKit/IOAddressSegment)

A structure that describes the location and size of a block of memory.

## Relationships

### Inherits From

[`IOMemoryDescriptor`](/documentation/DriverKit/IOMemoryDescriptor)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)