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

# IOMemoryMap

A reference to an existing block of memory in the current process or in a different process.

```
class IOMemoryMap;
```

## Overview

Use an [`IOMemoryMap`](/documentation/DriverKit/IOMemoryMap) object to share an existing block of memory. You don’t create instances of this class directly. Instead, call the [`CreateMapping`](/documentation/DriverKit/IOMemoryDescriptor/CreateMapping) method of [`IOMemoryDescriptor`](/documentation/DriverKit/IOMemoryDescriptor) to create a new memory map object for that descriptor’s contents. Use the methods of this class to get the address and size of the memory block, relative to the current process.

An [`IOMemoryMap`](/documentation/DriverKit/IOMemoryMap) object doesn’t own the memory it references, and you must not attempt to free that memory.

## Topics

### Configuring the Memory Map

[`init`](/documentation/DriverKit/IOMemoryMap/init)

Initializes the memory map object.

[`free`](/documentation/DriverKit/IOMemoryMap/free)

Performs any final cleanup for the memory map object.

### Getting the Map Attributes

[`GetAddress`](/documentation/DriverKit/IOMemoryMap/GetAddress)

Returns the address of the memory block.

[`GetLength`](/documentation/DriverKit/IOMemoryMap/GetLength)

Returns the length of the memory block in bytes.

[`GetOffset`](/documentation/DriverKit/IOMemoryMap/GetOffset)

Returns the offset from the original start of the memory block.



---

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)