Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkAllocationCallbacks

extends Struct<VkAllocationCallbacks>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure containing callback function pointers for memory allocation.
Valid Usage
See Also

VkAllocationFunction, VkFreeFunction, VkInternalAllocationNotification, VkInternalFreeNotification, VkReallocationFunction, AllocateMemory, CreateAccelerationStructureKHR, CreateAccelerationStructureNV, CreateAndroidSurfaceKHR, CreateBuffer, CreateBufferView, CreateCommandPool, CreateComputePipelines, CreateCuFunctionNVX, CreateCuModuleNVX, CreateDebugReportCallbackEXT, CreateDebugUtilsMessengerEXT, CreateDeferredOperationKHR, CreateDescriptorPool, CreateDescriptorSetLayout, CreateDescriptorUpdateTemplate, CreateDescriptorUpdateTemplateKHR, CreateDevice, CreateDirectFBSurfaceEXT, CreateDisplayModeKHR, CreateDisplayPlaneSurfaceKHR, CreateEvent, CreateExecutionGraphPipelinesAMDX, CreateFence, CreateFramebuffer, CreateGraphicsPipelines, CreateHeadlessSurfaceEXT, CreateImage, CreateImageView, CreateIndirectCommandsLayoutNV, CreateInstance, CreateMacOSSurfaceMVK, CreateMetalSurfaceEXT, CreateMicromapEXT, CreateOpticalFlowSessionNV, CreatePipelineCache, CreatePipelineLayout, CreatePrivateDataSlot, CreatePrivateDataSlotEXT, CreateQueryPool, CreateRayTracingPipelinesKHR, CreateRayTracingPipelinesNV, CreateRenderPass, CreateRenderPass2, CreateRenderPass2KHR, CreateSampler, CreateSamplerYcbcrConversion, CreateSamplerYcbcrConversionKHR, CreateSemaphore, CreateShaderModule, CreateShadersEXT, CreateSharedSwapchainsKHR, CreateSwapchainKHR, CreateValidationCacheEXT, CreateVideoSessionKHR, CreateVideoSessionParametersKHR, CreateWaylandSurfaceKHR, CreateWin32SurfaceKHR, CreateXcbSurfaceKHR, CreateXlibSurfaceKHR, DestroyAccelerationStructureKHR, DestroyAccelerationStructureNV, DestroyBuffer, DestroyBufferView, DestroyCommandPool, DestroyCuFunctionNVX, DestroyCuModuleNVX, DestroyDebugReportCallbackEXT, DestroyDebugUtilsMessengerEXT, DestroyDeferredOperationKHR, DestroyDescriptorPool, DestroyDescriptorSetLayout, DestroyDescriptorUpdateTemplate, DestroyDescriptorUpdateTemplateKHR, DestroyDevice, DestroyEvent, DestroyFence, DestroyFramebuffer, DestroyImage, DestroyImageView, DestroyIndirectCommandsLayoutNV, DestroyInstance, DestroyMicromapEXT, DestroyOpticalFlowSessionNV, DestroyPipeline, DestroyPipelineCache, DestroyPipelineLayout, DestroyPrivateDataSlot, DestroyPrivateDataSlotEXT, DestroyQueryPool, DestroyRenderPass, DestroySampler, DestroySamplerYcbcrConversion, DestroySamplerYcbcrConversionKHR, DestroySemaphore, DestroyShaderEXT, DestroyShaderModule, DestroySurfaceKHR, DestroySwapchainKHR, DestroyValidationCacheEXT, DestroyVideoSessionKHR, DestroyVideoSessionParametersKHR, FreeMemory, RegisterDeviceEventEXT, RegisterDisplayEventEXT

Layout


struct VkAllocationCallbacks {
    void * pUserData;
    PFN_vkAllocationFunction pfnAllocation;
    PFN_vkReallocationFunction pfnReallocation;
    PFN_vkFreeFunction pfnFree;
    PFN_vkInternalAllocationNotification pfnInternalAllocation;
    PFN_vkInternalFreeNotification pfnInternalFree;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
PFNALLOCATION

The struct member offsets.

public static final int
PFNFREE

The struct member offsets.

public static final int
PFNINTERNALALLOCATION

The struct member offsets.

public static final int
PFNINTERNALFREE

The struct member offsets.

public static final int
PFNREALLOCATION

The struct member offsets.

public static final int
PUSERDATA

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkAllocationCallbacks(long address, ByteBuffer container)

public
VkAllocationCallbacks(ByteBuffer container)

Creates a VkAllocationCallbacks instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VkAllocationCallbacks
calloc()

Returns a new VkAllocationCallbacks instance allocated with memCalloc.

public static VkAllocationCallbacks.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkAllocationCallbacks.Buffer instance allocated with memCalloc.

public static VkAllocationCallbacks
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkAllocationCallbacks instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkAllocationCallbacks.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkAllocationCallbacks.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkAllocationCallbacks
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkAllocationCallbacks
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkAllocationCallbacks.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkAllocationCallbacks.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected VkAllocationCallbacks
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkAllocationCallbacks
create()

Returns a new VkAllocationCallbacks instance allocated with BufferUtils.

public static VkAllocationCallbacks
create(long address)

Returns a new VkAllocationCallbacks instance for the specified memory address.

public static VkAllocationCallbacks.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkAllocationCallbacks.Buffer instance allocated with BufferUtils.

public static VkAllocationCallbacks.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkAllocationCallbacks.Buffer instance at the specified memory.

public static VkAllocationCallbacks
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkAllocationCallbacks.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public static VkAllocationCallbacks
malloc()

Returns a new VkAllocationCallbacks instance allocated with memAlloc.

public static VkAllocationCallbacks.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkAllocationCallbacks.Buffer instance allocated with memAlloc.

public static VkAllocationCallbacks
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkAllocationCallbacks instance allocated on the specified MemoryStack.

public static VkAllocationCallbacks.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkAllocationCallbacks.Buffer instance allocated on the specified MemoryStack.

public static VkAllocationCallbacks
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkAllocationCallbacks
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkAllocationCallbacks.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkAllocationCallbacks.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkAllocationFunction
npfnAllocation(long struct)

Unsafe version of pfnAllocation.

public static void
npfnAllocation(long struct, VkAllocationFunctionI value)

Unsafe version of pfnAllocation.

public static VkFreeFunction
npfnFree(long struct)

Unsafe version of pfnFree.

public static void
npfnFree(long struct, VkFreeFunctionI value)

Unsafe version of pfnFree.

public static VkInternalAllocationNotification
npfnInternalAllocation(long struct)

Unsafe version of pfnInternalAllocation.

public static void
public static VkInternalFreeNotification
npfnInternalFree(long struct)

Unsafe version of pfnInternalFree.

public static void
npfnInternalFree(long struct, VkInternalFreeNotificationI value)

Unsafe version of pfnInternalFree.

public static VkReallocationFunction
npfnReallocation(long struct)

Unsafe version of pfnReallocation.

public static void
npfnReallocation(long struct, VkReallocationFunctionI value)

Unsafe version of pfnReallocation.

public static long
npUserData(long struct)

Unsafe version of pUserData.

public static void
npUserData(long struct, long value)

Unsafe version of pUserData.

public VkAllocationFunction
pfnAllocation()

a VkAllocationFunction pointer to an application-defined memory allocation function.

public VkAllocationCallbacks
pfnAllocation(VkAllocationFunctionI value)

Sets the specified value to the pfnAllocation field.

public VkFreeFunction
pfnFree()

a VkFreeFunction pointer to an application-defined memory free function.

public VkAllocationCallbacks
pfnFree(VkFreeFunctionI value)

Sets the specified value to the pfnFree field.

public VkInternalAllocationNotification
pfnInternalAllocation()

a VkInternalAllocationNotification pointer to an application-defined function that is called by the implementation when the implementation makes internal allocations.

public VkAllocationCallbacks
public VkInternalFreeNotification
pfnInternalFree()

a VkInternalFreeNotification pointer to an application-defined function that is called by the implementation when the implementation frees internal allocations.

public VkAllocationCallbacks
pfnInternalFree(VkInternalFreeNotificationI value)

Sets the specified value to the pfnInternalFree field.

public VkReallocationFunction
pfnReallocation()

a VkReallocationFunction pointer to an application-defined memory reallocation function.

public VkAllocationCallbacks
pfnReallocation(VkReallocationFunctionI value)

Sets the specified value to the pfnReallocation field.

public long
pUserData()

a value to be interpreted by the implementation of the callbacks.

public VkAllocationCallbacks
pUserData(long value)

Sets the specified value to the pUserData field.

public VkAllocationCallbacks
set(long pUserData, VkAllocationFunctionI pfnAllocation, VkReallocationFunctionI pfnReallocation, VkFreeFunctionI pfnFree, VkInternalAllocationNotificationI pfnInternalAllocation, VkInternalFreeNotificationI pfnInternalFree)

Initializes this struct with the specified values.

public VkAllocationCallbacks

Returns:

this struct
set
(VkAllocationCallbacks
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate