Class VmaStatInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VmaStatInfo
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Calculated statistics of memory usage in entire allocator.

    Layout

    
     struct VmaStatInfo {
         uint32_t blockCount();
         uint32_t allocationCount();
         uint32_t unusedRangeCount();
         VkDeviceSize usedBytes();
         VkDeviceSize unusedBytes();
         VkDeviceSize allocationSizeMin;
         VkDeviceSize allocationSizeAvg;
         VkDeviceSize allocationSizeMax;
         VkDeviceSize unusedRangeSizeMin;
         VkDeviceSize unusedRangeSizeAvg;
         VkDeviceSize unusedRangeSizeMax;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • BLOCKCOUNT, ALLOCATIONCOUNT, UNUSEDRANGECOUNT, USEDBYTES, UNUSEDBYTES, ALLOCATIONSIZEMIN, ALLOCATIONSIZEAVG, ALLOCATIONSIZEMAX, UNUSEDRANGESIZEMIN, UNUSEDRANGESIZEAVG, UNUSEDRANGESIZEMAX

        The struct member offsets.
    • Constructor Detail

      • VmaStatInfo

        public VmaStatInfo​(java.nio.ByteBuffer container)
        Creates a VmaStatInfo 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • blockCount

        public int blockCount()
        number of VkDeviceMemory Vulkan memory blocks allocated
      • allocationCount

        public int allocationCount()
        number of VmaAllocation allocation objects allocated
      • unusedRangeCount

        public int unusedRangeCount()
        number of free ranges of memory between allocations
      • usedBytes

        public long usedBytes()
        total number of bytes occupied by all allocations
      • unusedBytes

        public long unusedBytes()
        total number of bytes occupied by unused ranges
      • allocationSizeMin

        public long allocationSizeMin()
        Returns:
        the value of the allocationSizeMin field.
      • allocationSizeAvg

        public long allocationSizeAvg()
        Returns:
        the value of the allocationSizeAvg field.
      • allocationSizeMax

        public long allocationSizeMax()
        Returns:
        the value of the allocationSizeMax field.
      • unusedRangeSizeMin

        public long unusedRangeSizeMin()
        Returns:
        the value of the unusedRangeSizeMin field.
      • unusedRangeSizeAvg

        public long unusedRangeSizeAvg()
        Returns:
        the value of the unusedRangeSizeAvg field.
      • unusedRangeSizeMax

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

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

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

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

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

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

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

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

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

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

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

        @Deprecated
        public static VmaStatInfo mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static VmaStatInfo callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

        @Deprecated
        public static VmaStatInfo.Buffer mallocStack​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
      • callocStack

        @Deprecated
        public static VmaStatInfo.Buffer callocStack​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
      • malloc

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

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

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

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

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

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

        public static int nunusedRangeCount​(long struct)
        Unsafe version of unusedRangeCount().
      • nusedBytes

        public static long nusedBytes​(long struct)
        Unsafe version of usedBytes().
      • nunusedBytes

        public static long nunusedBytes​(long struct)
        Unsafe version of unusedBytes().
      • nallocationSizeMin

        public static long nallocationSizeMin​(long struct)
        Unsafe version of allocationSizeMin().
      • nallocationSizeAvg

        public static long nallocationSizeAvg​(long struct)
        Unsafe version of allocationSizeAvg().
      • nallocationSizeMax

        public static long nallocationSizeMax​(long struct)
        Unsafe version of allocationSizeMax().
      • nunusedRangeSizeMin

        public static long nunusedRangeSizeMin​(long struct)
        Unsafe version of unusedRangeSizeMin().
      • nunusedRangeSizeAvg

        public static long nunusedRangeSizeAvg​(long struct)
        Unsafe version of unusedRangeSizeAvg().
      • nunusedRangeSizeMax

        public static long nunusedRangeSizeMax​(long struct)
        Unsafe version of unusedRangeSizeMax().