Vulkan Memory Allocator
Classes | Macros | Typedefs | Functions
General

Classes

struct  VmaAllocatorCreateInfo
 Description of a Allocator to be created. More...
 
struct  VmaStatInfo
 
struct  VmaStats
 General statistics from current state of Allocator. More...
 

Macros

#define VMA_STATS_STRING_ENABLED   1
 

Typedefs

typedef struct VmaAllocatorCreateInfo VmaAllocatorCreateInfo
 Description of a Allocator to be created. More...
 
typedef struct VmaStatInfo VmaStatInfo
 

Functions

VkResult vmaCreateAllocator (const VmaAllocatorCreateInfo *pCreateInfo, VmaAllocator *pAllocator)
 Creates Allocator object. More...
 
void vmaDestroyAllocator (VmaAllocator allocator)
 Destroys allocator object. More...
 
void vmaGetPhysicalDeviceProperties (VmaAllocator allocator, const VkPhysicalDeviceProperties **ppPhysicalDeviceProperties)
 
void vmaGetMemoryProperties (VmaAllocator allocator, const VkPhysicalDeviceMemoryProperties **ppPhysicalDeviceMemoryProperties)
 
void vmaGetMemoryTypeProperties (VmaAllocator allocator, uint32_t memoryTypeIndex, VkMemoryPropertyFlags *pFlags)
 Given Memory Type Index, returns Property Flags of this memory type. More...
 
void vmaCalculateStats (VmaAllocator allocator, VmaStats *pStats)
 Retrieves statistics from current state of the Allocator. More...
 
void vmaBuildStatsString (VmaAllocator allocator, char **ppStatsString, VkBool32 detailedMap)
 Builds and returns statistics as string in JSON format. More...
 
void vmaFreeStatsString (VmaAllocator allocator, char *pStatsString)
 

Detailed Description

Macro Definition Documentation

◆ VMA_STATS_STRING_ENABLED

#define VMA_STATS_STRING_ENABLED   1

Typedef Documentation

◆ VmaAllocatorCreateInfo

Description of a Allocator to be created.

◆ VmaStatInfo

typedef struct VmaStatInfo VmaStatInfo

Function Documentation

◆ vmaBuildStatsString()

void vmaBuildStatsString ( VmaAllocator  allocator,
char **  ppStatsString,
VkBool32  detailedMap 
)

Builds and returns statistics as string in JSON format.

Parameters
[out]ppStatsStringMust be freed using vmaFreeStatsString() function.

◆ vmaCalculateStats()

void vmaCalculateStats ( VmaAllocator  allocator,
VmaStats pStats 
)

Retrieves statistics from current state of the Allocator.

◆ vmaCreateAllocator()

VkResult vmaCreateAllocator ( const VmaAllocatorCreateInfo pCreateInfo,
VmaAllocator *  pAllocator 
)

Creates Allocator object.

◆ vmaDestroyAllocator()

void vmaDestroyAllocator ( VmaAllocator  allocator)

Destroys allocator object.

◆ vmaFreeStatsString()

void vmaFreeStatsString ( VmaAllocator  allocator,
char *  pStatsString 
)

◆ vmaGetMemoryProperties()

void vmaGetMemoryProperties ( VmaAllocator  allocator,
const VkPhysicalDeviceMemoryProperties **  ppPhysicalDeviceMemoryProperties 
)

PhysicalDeviceMemoryProperties are fetched from physicalDevice by the allocator. You can access it here, without fetching it again on your own.

◆ vmaGetMemoryTypeProperties()

void vmaGetMemoryTypeProperties ( VmaAllocator  allocator,
uint32_t  memoryTypeIndex,
VkMemoryPropertyFlags *  pFlags 
)

Given Memory Type Index, returns Property Flags of this memory type.

This is just a convenience function. Same information can be obtained using vmaGetMemoryProperties().

◆ vmaGetPhysicalDeviceProperties()

void vmaGetPhysicalDeviceProperties ( VmaAllocator  allocator,
const VkPhysicalDeviceProperties **  ppPhysicalDeviceProperties 
)

PhysicalDeviceProperties are fetched from physicalDevice by the allocator. You can access it here, without fetching it again on your own.