How gpuopen-librariesandsdks/vulkanmemoryallocator works
Vulkan Memory Allocator (VMA) is a single-header C++ implementation with a Vulkan-style public API. Its central workflow is that an engine requests a buffer or image with allocation preferences; VMA selects memory, allocates a suitable block and region, then creates and binds the resource. The README also documents optional mapping, pools, sparse binding, defragmentation, statistics, diagnostics, and virtual allocation. These capabilities are documented in the header but its implementation was not sampled, so internal links reflect README evidence rather than inspected call sites.
Main entry points: vk_mem_alloc.h VMA API · GpuMemDumpVis.py Dump visualizer
Components 15
Allocation and resources
- VMA API
include/vk_mem_alloc.h - Memory selection
include/vk_mem_alloc.h - Resource creation
include/vk_mem_alloc.h
Memory management
- Block allocation
include/vk_mem_alloc.h - Custom pools
include/vk_mem_alloc.h - Mapping and cache
include/vk_mem_alloc.h - Sparse binding
include/vk_mem_alloc.h - Virtual allocation
include/vk_mem_alloc.h - Defragmentation
include/vk_mem_alloc.h
Diagnostics and visualization
- Statistics and budget
include/vk_mem_alloc.h - JSON memory dump
include/vk_mem_alloc.h - Debug annotations
include/vk_mem_alloc.h - Dump visualizer
tools/GpuMemDumpVis/GpuMemDumpVis.py
Vulkan integration
- Vulkan runtime
Other components
- Engine client
Connections 16
- Engine client → VMA API: requests allocation
README.md - VMA API → Memory selection: selects memory
README.md - VMA API → Resource creation: creates resource
README.md - VMA API → Block allocation: reserves region
README.md - Resource creation → Block allocation: allocates memory
README.md - Resource creation → Vulkan runtime: creates and binds
README.md - VMA API → Custom pools: supports
README.md - VMA API → Mapping and cache: maps and flushes
README.md - VMA API → Sparse binding: allocates pages
README.md - VMA API → Virtual allocation: allocates custom data
README.md - VMA API → Defragmentation: moves allocations
README.md - VMA API → Statistics and budget: reports usage
README.md - VMA API → JSON memory dump: exports state
README.md - VMA API → Debug annotations: annotates allocations
README.md - Engine client → Dump visualizer: visualizes dump
README.md - JSON memory dump → Dump visualizer: provides JSON
README.md