Structures
VkAllocationCallbacks
Structure containing callback function pointers for memory allocation
Allocators are provided by the application as a pointer to a
VkAllocationCallbacks structure:
typedef struct VkAllocationCallbacks {
    void* pUserData;
    PFN_vkAllocationFunction pfnAllocation;
    PFN_vkReallocationFunction pfnReallocation;
    PFN_vkFreeFunction pfnFree;
    PFN_vkInternalAllocationNotification pfnInternalAllocation;
    PFN_vkInternalFreeNotification pfnInternalFree;
} VkAllocationCallbacks;
- pUserDatais a value to be interpreted by the implementation of the callbacks. When any of the callbacks in- VkAllocationCallbacksare called, the Vulkan implementation will pass this value as the first parameter to the callback. This value can vary each time an allocator is passed into a command, even when the same object takes an allocator in multiple commands.
- pfnAllocationis a PFN_vkAllocationFunction pointer to an application-defined memory allocation function.
- pfnReallocationis a PFN_vkReallocationFunction pointer to an application-defined memory reallocation function.
- pfnFreeis a PFN_vkFreeFunction pointer to an application-defined memory free function.
- pfnInternalAllocationis a PFN_vkInternalAllocationNotification pointer to an application-defined function that is called by the implementation when the implementation makes internal allocations.
- pfnInternalFreeis a PFN_vkInternalFreeNotification pointer to an application-defined function that is called by the implementation when the implementation frees internal allocations.
Valid Usage
VUID-VkAllocationCallbacks-pfnAllocation-00632
pfnAllocation must be a valid pointer to a valid
application-defined PFN_vkAllocationFunction
VUID-VkAllocationCallbacks-pfnReallocation-00633
pfnReallocation must be a valid pointer to a valid
application-defined PFN_vkReallocationFunction
VUID-VkAllocationCallbacks-pfnFree-00634
pfnFree must be a valid pointer to a valid application-defined
PFN_vkFreeFunction
VUID-VkAllocationCallbacks-pfnInternalAllocation-00635
If either of pfnInternalAllocation or pfnInternalFree is not
NULL, both must be valid callbacks