# VkMemoryAllocateFlagBits(3) Manual Page

## Name

VkMemoryAllocateFlagBits - Bitmask specifying flags for a device memory allocation

Loading… please wait.

## C Specification

Bits which can be set in VkMemoryAllocateFlagsInfo::`flags`, controlling device memory allocation, are:

    // Provided by VK_VERSION_1_1
    typedef enum VkMemoryAllocateFlagBits {
        VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001,
      // Provided by VK_VERSION_1_2
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT = 0x00000002,
      // Provided by VK_VERSION_1_2
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000004,
      // Provided by VK_EXT_zero_initialize_device_memory
        VK_MEMORY_ALLOCATE_ZERO_INITIALIZE_BIT_EXT = 0x00000008,
      // Provided by VK_KHR_device_group
        VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT,
      // Provided by VK_KHR_buffer_device_address
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT,
      // Provided by VK_KHR_buffer_device_address
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT,
    } VkMemoryAllocateFlagBits;

or the equivalent

    // Provided by VK_KHR_device_group
    typedef VkMemoryAllocateFlagBits VkMemoryAllocateFlagBitsKHR;

## Description

- `VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT` specifies that memory will be allocated for the devices in VkMemoryAllocateFlagsInfo::`deviceMask`.

- `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT` specifies that the memory can be attached to a buffer object created with the `VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT` bit set in `usage`, and that the memory handle can be used to retrieve an opaque address via vkGetDeviceMemoryOpaqueCaptureAddress.

- `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT` specifies that the memory’s address can be saved and reused on a subsequent run (e.g. for trace capture and replay), see VkBufferOpaqueCaptureAddressCreateInfo for more detail.

- `VK_MEMORY_ALLOCATE_ZERO_INITIALIZE_BIT_EXT` specifies that the memory will be zeroed automatically by the implementation before application is able to access it.

## See Also

VK_VERSION_1_1, VkMemoryAllocateFlags

## 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-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0