Class VmaStatistics

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VmaStatistics extends Struct<VmaStatistics> implements NativeResource

 struct VmaStatistics {
     uint32_t blockCount;
     uint32_t allocationCount;
     VkDeviceSize blockBytes;
     VkDeviceSize allocationBytes;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int BLOCKCOUNT
      The struct member offsets.
    • ALLOCATIONCOUNT

      public static final int ALLOCATIONCOUNT
      The struct member offsets.
    • BLOCKBYTES

      public static final int BLOCKBYTES
      The struct member offsets.
    • ALLOCATIONBYTES

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

    • VmaStatistics

      public VmaStatistics(ByteBuffer container)
      Creates a VmaStatistics 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<VmaStatistics>
    • blockCount

      public int blockCount()
      Returns:
      the value of the blockCount field.
    • allocationCount

      public int allocationCount()
      Returns:
      the value of the allocationCount field.
    • blockBytes

      public long blockBytes()
      Returns:
      the value of the blockBytes field.
    • allocationBytes

      public long allocationBytes()
      Returns:
      the value of the allocationBytes field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static VmaStatistics.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new VmaStatistics.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
    • nblockCount

      public static int nblockCount(long struct)
      Unsafe version of blockCount().
    • nallocationCount

      public static int nallocationCount(long struct)
      Unsafe version of allocationCount().
    • nblockBytes

      public static long nblockBytes(long struct)
      Unsafe version of blockBytes().
    • nallocationBytes

      public static long nallocationBytes(long struct)
      Unsafe version of allocationBytes().