Interface VkReallocationFunctionI
-
- All Superinterfaces:
- CallbackI, CallbackI.P, Pointer
- All Known Implementing Classes:
- VkReallocationFunction
@FunctionalInterface public interface VkReallocationFunctionI extends CallbackI.P
Instances of this interface may be set to thepfnReallocationmember of theVkAllocationCallbacksstruct.The function must alter the size of the allocation
pOriginal, either by shrinking or growing it, to accommodate the new size.If
pOriginalisNULL, thenpfnReallocationmust behave similarly toVkAllocationFunction. If size is zero, thenpfnReallocationmust behave similarly toVkFreeFunction. The contents of the original allocation from bytes zero tomin(original size, new size) − 1must be preserved in the new allocation. If the new allocation is larger than the old allocation, then the contents of the additional space are undefined. IfpOriginalis non-NULL, alignment must be equal to the originally requested alignment. If satisfying these requirements involves creating a new allocation, then the old allocation must be freed. If this function fails, it must returnNULLand not free the old 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
-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method and Description default longaddress()Returns the raw pointer address as alongvalue.default longcallback(long args)Will be called by native code.longinvoke(long pUserData, long pOriginal, long size, long alignment, int allocationScope)Will be called by the Vulkan implementation to reallocate memory.
-
-
-
Method Detail
-
address
default long address()
Description copied from interface:PointerReturns the raw pointer address as alongvalue.
-
callback
default long callback(long args)
Description copied from interface:CallbackI.PWill be called by native code.- Specified by:
callbackin interfaceCallbackI.P- Parameters:
args- pointer to aDCArgsiterator- Returns:
- the value to store to the result
DCValue
-
invoke
long invoke(long pUserData, long pOriginal, long size, long alignment, int allocationScope)Will be called by the Vulkan implementation to reallocate memory.- Parameters:
pUserData- the value specified forVkAllocationCallbacks.pUserDatain the allocator specified by the applicationpOriginal- must be eitherNULLor a pointer previously returned bypfnReallocationorpfnAllocationof the same allocatorsize- the size in bytes of the requested allocationalignment- the requested alignment of the allocation in bytes and must be a power of twoallocationScope- aVkSystemAllocationScopevalue specifying the scope of the lifetime of the allocation
-
-