← 返回首页
Vulkan® Memory Allocator - AMD GPUOpenVulkan® Memory Allocator - AMD GPUOpen

Vulkan Memory Allocator

The industry-leading, open source, memory allocation library for the Vulkan® API.

The Vulkan® Memory Allocator (VMA) library provides a simple and easy to integrate API to help you allocate memory for Vulkan® buffer and image storage.

Download the latest version - v3.3.0

This release contains the following:

  • Added function vmaImportVulkanFunctionsFromVolk, useful for loading pointers to Vulkan functions with volk library.

Other changes:

  • Added macro ‘VMA_DEBUG_DONT_EXCEED_HEAP_SIZE_WITH_ALLOCATION_SIZE’ with default value 1.
  • Changed macro ‘VMA_DEBUG_DONT_EXCEED_MAX_MEMORY_ALLOCATION_COUNT’ default value from 0 to 1.
  • Added documentation chapter “Frequently asked questions”.
  • Other fixes and improvements, including compatibility with various platforms and compilers.

Benefits

The library is battle-ready, and integrated into the majority of Vulkan® game titles on PC, as well as the Google Filament rendering engine, the official Khronos® Group Vulkan® Samples, and many other open source projects for Android™, Linux, MacOS, and Windows®.

This library can help game developers to manage memory allocations and resource creation by offering some higher-level functions:

  1. Functions that help to choose correct and optimal memory type based on intended usage of the memory.
    • Required or preferred traits of the memory are expressed using higher-level description comparing to Vulkan flags.
  2. Functions that allocate memory blocks, reserve and return parts of them (VkDeviceMemory + offset + size) to the user.
    • Library keeps track of allocated memory blocks, used and unused ranges inside them, finds best matching unused ranges for new allocations, respects all the rules of alignment and buffer/image granularity.
  3. Functions that can create an image/buffer, allocate memory for it and bind them together – all in one call.

Additional features

  • Self-contained C++ library in single header file. No external dependencies other than the standard C and C++ library and Vulkan.
  • Public interface in C, in same convention as Vulkan API. Implementation in C++.
  • Platform-independent, but developed and tested on Windows using Visual Studio. Continuous integration setup for Windows and Linux. Used also on Android, MacOS, and other platforms.
  • Support for memory mapping, reference-counted internally.
  • Support for persistently mapped memory: Just allocate with appropriate flag and access the pointer to already mapped memory.
  • Linear allocator: Create a pool with linear algorithm and use it for much faster allocations and deallocations in free-at-once, stack, double stack, or ring buffer fashion.
  • Defragmentation of GPU and CPU memory: Let the library move data around to free some memory blocks and make your allocations better compacted.
  • Statistics: Obtain brief or detailed statistics about the amount of memory used, unused, number of allocated blocks, number of allocations etc. - globally, per memory heap, and per memory type.
  • Debug annotations: Associate custom void* pUserData and debug char* pName with each allocation.
  • JSON dump: Output a JSON string with detailed map of internal state, including allocations, their string names, and gaps between them.
  • Convert JSON dump into a picture to visualize your memory.
  • Support for interoperability with OpenGL.
  • Virtual allocator: Interface for using core allocation algorithm to allocate any custom data, e.g. pieces of one large buffer.

I can let VMA handle all the hard work and do a better job than I would. On top of that it still lets me easily drop down to raw Vulkan when I need the finest control for something specific. You should absolutely use VMA for your general memory allocation needs in Vulkan, even when you do need something special it will probably do that for you or make it easy to write some special case code.

Baldur Karlsson
Creator, RenderDoc

We integrated AMD’s Vulkan Memory Allocator (VMA) and never looked back.

Jean-Noe Morissette
Software Architect, Ubisoft

My experience with VMA (…) was that it let you have as much or little control as you wanted. Made Vulkan feel more like D3D11 unless you really wanted to think about heaps. I am doing another Vk project soon and plan to use it.

Timothy Lochner
Senior Engine Architect, Rightware Inc.

Requirements

  • Self-contained C++ library in single header file. No external dependencies other than the standard C and C++ library and Vulkan.

Version history

Version 3.3.0 (May 2025)

  • Added function vmaImportVulkanFunctionsFromVolk, useful for loading pointers to Vulkan functions with volk library.

Other changes:

  • Added macro VMA_DEBUG_DONT_EXCEED_HEAP_SIZE_WITH_ALLOCATION_SIZE with default value 1.
  • Changed macro VMA_DEBUG_DONT_EXCEED_MAX_MEMORY_ALLOCATION_COUNT default value from 0 to 1.
  • Added documentation chapter "Frequently asked questions".
  • Other fixes and improvements, including compatibility with various platforms and compilers.

Version 3.2.1 (February 2025)

Version 3.2.0 (December 2024)

Version 3.1.0 (May 2024)

Version 3.0.1 (May 2022)

Version 3.0.0 (March 2022)

Version 2.3.0 (December 2019)

Version 2.2.0 (December 2018)

Version 2.1.0 (September 2018)

Version 2.0.0 (March 2018)

Version 1.0.0 (July 2017)

Related news and technical articles

AMD DGF: An Open Geometry Compression Standard
AMD is partnering with Samsung on a multivendor Vulkan extension for Dense Geometry Format (DGF) to help enable dramatically smaller geometry, reduced memory/latency for ray-traced real‑time 3D, and easier engine integration.
Introducing AMD DGF SuperCompression
AMD DGF SuperCompression (DGFS) cuts DGF geometry file sizes while preserving exact block reconstruction and enabling fast decode to either DGF blocks or conventional meshlets for cross-device deployment.
AMD releases Vulkan support for Dense Geometry Format
We’ve released a provisional Vulkan® extension for AMD Dense Geometry Format (DGF), our block-based geometry compression technology.
GPU Work Graphs mesh nodes in Vulkan®
We’ve added mesh nodes to our Vulkan® experimental extension, VK_AMDX_shader_enqueue.
AMD Radeon Anti-Lag 2 SDK
Learn how to integrate the AMD Radeon Anti-Lag 2 SDK into your game. Unlike the driver-based AL 1, AL 2's point of insertion is at the optimal point inside the game's logic, just before the user controls are sampled.
Introducing Compressonator v4.5 with up to 20% improvement in Brotli-G compression
Compressonator v4.5 introduces improved BC1-BC5 compression that reduces file sizes on average by 10%-15% using a new Brotli-G zip packaging feature, mipmap changes, ETC codec fixes, and more.
Radeon™ GPU Detective adds Vulkan® support on Windows®
The latest version of Radeon™ GPU Detective is out now! RGD v1.1 introduces support for post-mortem analysis of Vulkan applications on Windows.
How do I become a graphics programmer? - A small guide from the AMD Game Engineering team
It is often difficult to know where to start when taking your first in the world of graphics. This guide is here to help with a discussion of first steps and a list of useful websites.

Related videos

GPU Reshape – Modern Shader Instrumentation and Instruction Level Validation (Digital Dragons 2024) – YouTube link
GPU Reshape is, a just-in-time instrumentation framework with instruction level validation of shaders. A deep dive into current validation methodologies, and what the future of instrumentation may hold.
Mesh Shaders – Learning Through Examples (Digital Dragons 2024) – YouTube link
Learn about the new Mesh Shader pipeline which can help to create even more better-looking games.
Game Optimization: Radeon™ Developer Tools on RADV and Steam Deck™ (Vulkanised 2023 - YouTube link)
This talk at Vulkanised 2023 covers how to use the Radeon Developer Tool Suite (RDTS) to optimize games using RADV and Steam Deck.
Introducing AMD Render Pipeline Shaders SDK
The brand-new AMD Render Pipeline Shaders (RPS) SDK is a comprehensive and extensible Render Graph framework for graphics applications and engines using explicit APIs (such as DirectX® 12 and Vulkan®). In this video we will take a look at the overview of the design and implementation of the SDK. We will demonstrate how the RPS SDK can help game engines building render graphs easily, managing resource barriers and transient memory efficiently, and more!
Memory Management in Vulkan® - YouTube link
This talk by AMD's Ste Tovey discusses memory management with Vulkan® at Vulkanised 2018.
Optimising a AAA Vulkan® Title on Desktop
This talk by AMD's Lou Kramer discusses optimising AAA Vulkan® titles on desktop.
World War Z – Using Vulkan® to Tame the Zombie Swarm
A talk by AMD's Jordan Logan and Saber Interactive's Nikolai Petrov at Reboot DEVELOPRED in 2019.
Porting Your Engine to Vulkan® or DirectX®12
This talk by AMD's Adam Sawicki at Digital Dragons in 2018 discusses how to port your engine to Vulkan® or DirectX®12.