Class VkReallocationFunction

  • All Implemented Interfaces:
    java.lang.AutoCloseable, CallbackI, CallbackI.P, NativeResource, Pointer, VkReallocationFunctionI


    public abstract class VkReallocationFunction
    extends Callback
    implements VkReallocationFunctionI
    Instances of this class may be set to the pfnReallocation member of the VkAllocationCallbacks struct.

    The function must alter the size of the allocation pOriginal, either by shrinking or growing it, to accommodate the new size.

    If pOriginal is NULL, then pfnReallocation must behave similarly to VkAllocationFunction. If size is zero, then pfnReallocation must behave similarly to VkFreeFunction. The contents of the original allocation from bytes zero to min(original size, new size) − 1 must 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. If pOriginal is 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 return NULL and not free the old allocation.

    • Method Detail

      • create

        public static VkReallocationFunction create(long functionPointer)
        Creates a VkReallocationFunction instance from the specified function pointer.