# VkMappedMemoryRange(3) Manual Page

## Name

VkMappedMemoryRange - Structure specifying a mapped memory range

Loading… please wait.

## C Specification

The `VkMappedMemoryRange` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkMappedMemoryRange {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceMemory     memory;
        VkDeviceSize       offset;
        VkDeviceSize       size;
    } VkMappedMemoryRange;

## Members

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `memory` is the memory object to which this range belongs.

- `offset` is the zero-based byte offset from the beginning of the memory object.

- `size` is either the size of range, or `VK_WHOLE_SIZE` to affect the range from `offset` to the end of the current mapping of the allocation.

## Description

Valid Usage

- VUID-VkMappedMemoryRange-memory-00684
  `memory` must be currently host mapped

- VUID-VkMappedMemoryRange-size-00685
  If `size` is not equal to `VK_WHOLE_SIZE`, `offset` and `size` must specify a range contained within the currently mapped range of `memory`

- VUID-VkMappedMemoryRange-size-00686
  If `size` is equal to `VK_WHOLE_SIZE`, `offset` must be within the currently mapped range of `memory`

- VUID-VkMappedMemoryRange-offset-00687
  `offset` must be a multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize`

- VUID-VkMappedMemoryRange-size-01389
  If `size` is equal to `VK_WHOLE_SIZE`, the end of the current mapping of `memory` must either be a multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize` bytes from the beginning of the memory object, or be equal to the end of the memory object

- VUID-VkMappedMemoryRange-size-01390
  If `size` is not equal to `VK_WHOLE_SIZE`, `size` must either be a multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize`, or `offset` plus `size` must equal the size of `memory`

Valid Usage (Implicit)

- VUID-VkMappedMemoryRange-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE`

- VUID-VkMappedMemoryRange-pNext-pNext
  `pNext` must be `NULL`

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

## See Also

VK_VERSION_1_0, VkDeviceMemory, VkDeviceSize, VkStructureType, vkFlushMappedMemoryRanges, vkInvalidateMappedMemoryRanges

## 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