- All Known Implementing Classes:
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface VkAllocationFunctionI extends CallbackI.PApplication-defined memory allocation function.
The type of
typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( void* pUserData, size_t size, size_t alignment, VkSystemAllocationScope allocationScope);
pfnAllocationis unable to allocate the requested memory, it must return
NULL. If the allocation was successful, it must return a valid pointer to memory allocation containing at least
sizebytes, and with the pointer value being a multiple of
NULL, and if the implementation is unable to continue correct processing of the current command without the requested allocation, it must treat this as a run-time error, and generate
ERROR_OUT_OF_HOST_MEMORYat the appropriate time for the command in which the condition was detected, as described in Return Codes.
If the implementation is able to continue correct processing of the current command without the requested allocation, then it may do so, and must not generate
ERROR_OUT_OF_HOST_MEMORYas a result of this failed allocation.
Nested Class Summary
Nested classes/interfaces inherited from interface org.lwjgl.system.CallbackI
CallbackI.B, CallbackI.D, CallbackI.F, CallbackI.I, CallbackI.J, CallbackI.P, CallbackI.S, CallbackI.V, CallbackI.Z
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description
callback(long args)Will be called by native code.
getSignature()Returns the dyncall signature for this callback function.
invoke(long pUserData, long size, long alignment, int allocationScope)Application-defined memory allocation function.
default java.lang.String getSignature()Description copied from interface:
CallbackIReturns the dyncall signature for this callback function. [INTERNAL API]
default long callback(long args)Description copied from interface:
CallbackI.PWill be called by native code.
long invoke(long pUserData, long size, long alignment, int allocationScope)Application-defined memory allocation function.
pUserData- the value specified for
::pUserDatain the allocator specified by the application.
size- the size in bytes of the requested allocation.
alignment- the requested alignment of the allocation in bytes and must be a power of two.
VkSystemAllocationScopevalue specifying the allocation scope of the lifetime of the allocation, as described here.