<!--
{
  "availability" : [
    "DriverKit: 21.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BlockStorageDeviceDriverKit",
  "identifier" : "/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/DoAsyncUnmap",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BlockStorageDeviceDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserBlockStorageDevice@F@DoAsyncUnmap#i#*$@S@IOMemoryDescriptor#i#"
  },
  "title" : "DoAsyncUnmap"
}
-->

# DoAsyncUnmap

Sends an asynchronous request to the dext to reclaim storage by unmapping.

```
virtual kern_return_t DoAsyncUnmap(uint32_t requestID, IOMemoryDescriptor *buffer, uint32_t numOfRanges);
```

## Parameters

`requestID`

An opaque identifier. After the dext completes the request, it calls [`Complete`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/Complete) and sends this value as a parameter.

`buffer`

A memory buffer containing the block ranges to unmap.

`numOfRanges`

The number of ranges in `buffer`.

## Return Value

A value that indicates the unmap result. <doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> indicates success. For error definitions, see <doc://com.apple.documentation/documentation/iokit/iokit_constants>.

## Discussion

When the unmap operation completes, the dext calls your [`Complete`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/Complete) method with the results of the operation.

---

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)