Class VmaDefragmentationMove

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VmaDefragmentationMove extends Struct<VmaDefragmentationMove> implements NativeResource

 struct VmaDefragmentationMove {
     VmaDefragmentationMoveOperation operation;
     VmaAllocation srcAllocation;
     VmaAllocation dstTmpAllocation;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • OPERATION

      public static final int OPERATION
      The struct member offsets.
    • SRCALLOCATION

      public static final int SRCALLOCATION
      The struct member offsets.
    • DSTTMPALLOCATION

      public static final int DSTTMPALLOCATION
      The struct member offsets.
  • Constructor Details

    • VmaDefragmentationMove

      public VmaDefragmentationMove(ByteBuffer container)
      Creates a VmaDefragmentationMove instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<VmaDefragmentationMove>
    • operation

      public int operation()
      Returns:
      the value of the operation field.
    • srcAllocation

      public long srcAllocation()
      Returns:
      the value of the srcAllocation field.
    • dstTmpAllocation

      public long dstTmpAllocation()
      Returns:
      the value of the dstTmpAllocation field.
    • operation

      public VmaDefragmentationMove operation(int value)
      Sets the specified value to the operation field.
    • srcAllocation

      public VmaDefragmentationMove srcAllocation(long value)
      Sets the specified value to the srcAllocation field.
    • dstTmpAllocation

      public VmaDefragmentationMove dstTmpAllocation(long value)
      Sets the specified value to the dstTmpAllocation field.
    • set

      public VmaDefragmentationMove set(int operation, long srcAllocation, long dstTmpAllocation)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static VmaDefragmentationMove malloc()
      Returns a new VmaDefragmentationMove instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VmaDefragmentationMove calloc()
      Returns a new VmaDefragmentationMove instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VmaDefragmentationMove create()
      Returns a new VmaDefragmentationMove instance allocated with BufferUtils.
    • create

      public static VmaDefragmentationMove create(long address)
      Returns a new VmaDefragmentationMove instance for the specified memory address.
    • createSafe

      public static @Nullable VmaDefragmentationMove createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VmaDefragmentationMove.Buffer malloc(int capacity)
      Returns a new VmaDefragmentationMove.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VmaDefragmentationMove.Buffer calloc(int capacity)
      Returns a new VmaDefragmentationMove.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VmaDefragmentationMove.Buffer create(int capacity)
      Returns a new VmaDefragmentationMove.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VmaDefragmentationMove.Buffer create(long address, int capacity)
      Create a VmaDefragmentationMove.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable VmaDefragmentationMove.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static VmaDefragmentationMove malloc(MemoryStack stack)
      Returns a new VmaDefragmentationMove instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VmaDefragmentationMove calloc(MemoryStack stack)
      Returns a new VmaDefragmentationMove instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static VmaDefragmentationMove.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new VmaDefragmentationMove.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VmaDefragmentationMove.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new VmaDefragmentationMove.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • noperation

      public static int noperation(long struct)
      Unsafe version of operation().
    • nsrcAllocation

      public static long nsrcAllocation(long struct)
      Unsafe version of srcAllocation().
    • ndstTmpAllocation

      public static long ndstTmpAllocation(long struct)
      Unsafe version of dstTmpAllocation().
    • noperation

      public static void noperation(long struct, int value)
      Unsafe version of operation.
    • nsrcAllocation

      public static void nsrcAllocation(long struct, long value)
      Unsafe version of srcAllocation.
    • ndstTmpAllocation

      public static void ndstTmpAllocation(long struct, long value)
      Unsafe version of dstTmpAllocation.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate