Vulkan Memory Allocator
|
API elements that query current status of the allocator, from memory usage, budget, to full dump of the internal state in JSON format. See documentation chapter: Statistics. More...
Classes | |
struct | VmaStatistics |
Calculated statistics of memory usage e.g. in a specific memory type, heap, custom pool, or total. More... | |
struct | VmaDetailedStatistics |
More detailed statistics than VmaStatistics. More... | |
struct | VmaTotalStatistics |
General statistics from current state of the Allocator - total memory usage across all memory heaps and types. More... | |
struct | VmaBudget |
Statistics of current memory usage and available budget for a specific memory heap. More... | |
Typedefs | |
typedef struct VmaStatistics | VmaStatistics |
Calculated statistics of memory usage e.g. in a specific memory type, heap, custom pool, or total. More... | |
typedef struct VmaDetailedStatistics | VmaDetailedStatistics |
More detailed statistics than VmaStatistics. More... | |
typedef struct VmaTotalStatistics | VmaTotalStatistics |
General statistics from current state of the Allocator - total memory usage across all memory heaps and types. More... | |
typedef struct VmaBudget | VmaBudget |
Statistics of current memory usage and available budget for a specific memory heap. More... | |
Functions | |
void | vmaCalculateStatistics (VmaAllocator allocator, VmaTotalStatistics *pStats) |
Retrieves statistics from current state of the Allocator. More... | |
void | vmaGetHeapBudgets (VmaAllocator allocator, VmaBudget *pBudgets) |
Retrieves information about current memory usage and budget for all memory heaps. More... | |
void | vmaGetPoolStatistics (VmaAllocator allocator, VmaPool pool, VmaStatistics *pPoolStats) |
Retrieves statistics of existing VmaPool object. More... | |
void | vmaCalculatePoolStatistics (VmaAllocator allocator, VmaPool pool, VmaDetailedStatistics *pPoolStats) |
Retrieves detailed statistics of existing VmaPool object. More... | |
API elements that query current status of the allocator, from memory usage, budget, to full dump of the internal state in JSON format. See documentation chapter: Statistics.
Statistics of current memory usage and available budget for a specific memory heap.
These are fast to calculate. See function vmaGetHeapBudgets().
typedef struct VmaDetailedStatistics VmaDetailedStatistics |
More detailed statistics than VmaStatistics.
These are slower to calculate. Use for debugging purposes. See functions: vmaCalculateStatistics(), vmaCalculatePoolStatistics().
Previous version of the statistics API provided averages, but they have been removed because they can be easily calculated as:
typedef struct VmaStatistics VmaStatistics |
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().
typedef struct VmaTotalStatistics VmaTotalStatistics |
General statistics from current state of the Allocator - total memory usage across all memory heaps and types.
These are slower to calculate. Use for debugging purposes. See function vmaCalculateStatistics().
void vmaCalculatePoolStatistics | ( | VmaAllocator | allocator, |
VmaPool | pool, | ||
VmaDetailedStatistics * | pPoolStats | ||
) |
Retrieves detailed statistics of existing VmaPool object.
allocator | Allocator object. | |
pool | Pool object. | |
[out] | pPoolStats | Statistics of specified pool. |
void vmaCalculateStatistics | ( | VmaAllocator | allocator, |
VmaTotalStatistics * | pStats | ||
) |
Retrieves statistics from current state of the Allocator.
This function is called "calculate" not "get" because it has to traverse all internal data structures, so it may be quite slow. Use it for debugging purposes. For faster but more brief statistics suitable to be called every frame or every allocation, use vmaGetHeapBudgets().
Note that when using allocator from multiple threads, returned information may immediately become outdated.
void vmaGetHeapBudgets | ( | VmaAllocator | allocator, |
VmaBudget * | pBudgets | ||
) |
Retrieves information about current memory usage and budget for all memory heaps.
allocator | ||
[out] | pBudgets | Must point to array with number of elements at least equal to number of memory heaps in physical device used. |
This function is called "get" not "calculate" because it is very fast, suitable to be called every frame or every allocation. For more detailed statistics use vmaCalculateStatistics().
Note that when using allocator from multiple threads, returned information may immediately become outdated.
void vmaGetPoolStatistics | ( | VmaAllocator | allocator, |
VmaPool | pool, | ||
VmaStatistics * | pPoolStats | ||
) |
Retrieves statistics of existing VmaPool object.
allocator | Allocator object. | |
pool | Pool object. | |
[out] | pPoolStats | Statistics of specified pool. |