Vulkan Memory Allocator
Loading...
Searching...
No Matches
Public Attributes | List of all members
VmaStatistics Struct Reference

Calculated statistics of memory usage e.g. in a specific memory type, heap, custom pool, or total. More...

Public Attributes

uint32_t blockCount
 Number of VkDeviceMemory objects - Vulkan memory blocks allocated.
 
uint32_t allocationCount
 Number of VmaAllocation objects allocated.
 
VkDeviceSize blockBytes
 Number of bytes allocated in VkDeviceMemory blocks.
 
VkDeviceSize allocationBytes
 Total number of bytes occupied by all VmaAllocation objects.
 

Detailed Description

Calculated statistics of memory usage e.g. in a specific memory type, heap, custom pool, or total.

These are fast to calculate. See functions: vmaGetHeapBudgets(), vmaGetPoolStatistics().

Member Data Documentation

◆ allocationBytes

VkDeviceSize VmaStatistics::allocationBytes

Total number of bytes occupied by all VmaAllocation objects.

Always less or equal than blockBytes. Difference (blockBytes - allocationBytes) is the amount of memory allocated from Vulkan but unused by any VmaAllocation.

◆ allocationCount

uint32_t VmaStatistics::allocationCount

Number of VmaAllocation objects allocated.

Dedicated allocations have their own blocks, so each one adds 1 to allocationCount as well as blockCount.

◆ blockBytes

VkDeviceSize VmaStatistics::blockBytes

Number of bytes allocated in VkDeviceMemory blocks.

Note
To avoid confusion, please be aware that what Vulkan calls an "allocation" - a whole VkDeviceMemory object (e.g. as in VkPhysicalDeviceLimits::maxMemoryAllocationCount) is called a "block" in VMA, while VMA calls "allocation" a VmaAllocation object that represents a memory region sub-allocated from such block, usually for a single buffer or image.

◆ blockCount

uint32_t VmaStatistics::blockCount

Number of VkDeviceMemory objects - Vulkan memory blocks allocated.


The documentation for this struct was generated from the following file: