vkUnmapMemory(3)

# vkUnmapMemory(3) Manual Page

## Name

vkUnmapMemory - Unmap a previously mapped memory object

Loading… please wait.

## C Specification

To unmap a memory object once host access to it is no longer needed by the application, call:

    // Provided by VK_VERSION_1_0
    void vkUnmapMemory(
        VkDevice                                    device,
        VkDeviceMemory                              memory);

## Parameters

- `device` is the logical device that owns the memory.

- `memory` is the memory object to be unmapped.

## Description

Calling `vkUnmapMemory` is equivalent to calling vkUnmapMemory2KHR with an empty `pNext` chain and the flags parameter set to zero.

Valid Usage

- VUID-vkUnmapMemory-memory-00689
  `memory` must be currently host mapped

Valid Usage (Implicit)

- VUID-vkUnmapMemory-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkUnmapMemory-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-vkUnmapMemory-memory-parent
  `memory` must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `memory` must be externally synchronized

## See Also

VK_VERSION_1_0, VkDevice, VkDeviceMemory

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0