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. More...
Classes | |
struct | VmaStatInfo |
Calculated statistics of memory usage in entire allocator. More... | |
struct | VmaStats |
General statistics from current state of Allocator. More... | |
struct | VmaBudget |
Statistics of current memory usage and available budget, in bytes, for specific memory heap. More... | |
struct | VmaPoolStats |
Describes parameter of existing VmaPool. More... | |
Typedefs | |
typedef struct VmaStatInfo | VmaStatInfo |
Calculated statistics of memory usage in entire allocator. More... | |
typedef struct VmaStats | VmaStats |
General statistics from current state of Allocator. More... | |
typedef struct VmaBudget | VmaBudget |
Statistics of current memory usage and available budget, in bytes, for specific memory heap. More... | |
typedef struct VmaPoolStats | VmaPoolStats |
Describes parameter of existing VmaPool. More... | |
Functions | |
void | vmaCalculateStats (VmaAllocator allocator, VmaStats *pStats) |
Retrieves statistics from current state of the Allocator. More... | |
void | vmaGetHeapBudgets (VmaAllocator allocator, VmaBudget *pBudgets) |
Retrieves information about current memory budget for all memory heaps. More... | |
void | vmaGetPoolStats (VmaAllocator allocator, VmaPool pool, VmaPoolStats *pPoolStats) |
Retrieves statistics of existing VmaPool object. More... | |
void | vmaBuildVirtualBlockStatsString (VmaVirtualBlock virtualBlock, char **ppStatsString, VkBool32 detailedMap) |
Builds and returns a null-terminated string in JSON format with information about given VmaVirtualBlock. More... | |
void | vmaFreeVirtualBlockStatsString (VmaVirtualBlock virtualBlock, char *pStatsString) |
Frees a string returned by vmaBuildVirtualBlockStatsString(). More... | |
void | vmaBuildStatsString (VmaAllocator allocator, char **ppStatsString, VkBool32 detailedMap) |
Builds and returns statistics as a null-terminated string in JSON format. More... | |
void | vmaFreeStatsString (VmaAllocator allocator, char *pStatsString) |
API elements that query current status of the allocator, from memory usage, budget, to full dump of the internal state in JSON format.
Statistics of current memory usage and available budget, in bytes, for specific memory heap.
typedef struct VmaPoolStats VmaPoolStats |
Describes parameter of existing VmaPool.
typedef struct VmaStatInfo VmaStatInfo |
Calculated statistics of memory usage in entire allocator.
void vmaBuildStatsString | ( | VmaAllocator | allocator, |
char ** | ppStatsString, | ||
VkBool32 | detailedMap | ||
) |
Builds and returns statistics as a null-terminated string in JSON format.
allocator | ||
[out] | ppStatsString | Must be freed using vmaFreeStatsString() function. |
detailedMap |
void vmaBuildVirtualBlockStatsString | ( | VmaVirtualBlock | virtualBlock, |
char ** | ppStatsString, | ||
VkBool32 | detailedMap | ||
) |
Builds and returns a null-terminated string in JSON format with information about given VmaVirtualBlock.
virtualBlock | Virtual block. | |
[out] | ppStatsString | Returned string. |
detailedMap | Pass VK_FALSE to only obtain statistics as returned by vmaCalculateVirtualBlockStats(). Pass VK_TRUE to also obtain full list of allocations and free spaces. |
Returned string must be freed using vmaFreeVirtualBlockStatsString().
void vmaCalculateStats | ( | VmaAllocator | allocator, |
VmaStats * | 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. 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 vmaFreeStatsString | ( | VmaAllocator | allocator, |
char * | pStatsString | ||
) |
void vmaFreeVirtualBlockStatsString | ( | VmaVirtualBlock | virtualBlock, |
char * | pStatsString | ||
) |
Frees a string returned by vmaBuildVirtualBlockStatsString().
void vmaGetHeapBudgets | ( | VmaAllocator | allocator, |
VmaBudget * | pBudgets | ||
) |
Retrieves information about current memory 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 vmaCalculateStats().
Note that when using allocator from multiple threads, returned information may immediately become outdated.
void vmaGetPoolStats | ( | VmaAllocator | allocator, |
VmaPool | pool, | ||
VmaPoolStats * | pPoolStats | ||
) |
Retrieves statistics of existing VmaPool object.
allocator | Allocator object. | |
pool | Pool object. | |
[out] | pPoolStats | Statistics of specified pool. |