Vulkan Memory Allocator
|
Statistics of current memory usage and available budget, in bytes, for specific memory heap. More...
#include <vk_mem_alloc.h>
Public Attributes | |
VkDeviceSize | blockBytes |
Sum size of all VkDeviceMemory blocks allocated from particular heap, in bytes. More... | |
VkDeviceSize | allocationBytes |
Sum size of all allocations created in particular heap, in bytes. More... | |
VkDeviceSize | usage |
Estimated current memory usage of the program, in bytes. More... | |
VkDeviceSize | budget |
Estimated amount of memory available to the program, in bytes. More... | |
Statistics of current memory usage and available budget, in bytes, for specific memory heap.
VkDeviceSize VmaBudget::allocationBytes |
Sum size of all allocations created in particular heap, in bytes.
Usually less or equal than blockBytes
. Difference blockBytes - allocationBytes
is the amount of memory allocated but unused - available for new allocations or wasted due to fragmentation.
VkDeviceSize VmaBudget::blockBytes |
Sum size of all VkDeviceMemory
blocks allocated from particular heap, in bytes.
VkDeviceSize VmaBudget::budget |
Estimated amount of memory available to the program, in bytes.
Fetched from system using VK_EXT_memory_budget
extension if enabled.
It might be different (most probably smaller) than VkMemoryHeap::size[heapIndex]
due to factors external to the program, like other programs also consuming system resources. Difference budget - usage
is the amount of additional memory that can probably be allocated without problems. Exceeding the budget may result in various problems.
VkDeviceSize VmaBudget::usage |
Estimated current memory usage of the program, in bytes.
Fetched from system using VK_EXT_memory_budget
extension if enabled.
It might be different than blockBytes
(usually higher) due to additional implicit objects also occupying the memory, like swapchain, pipelines, descriptor heaps, command buffers, or VkDeviceMemory
blocks allocated outside of this library, if any.