Class VmaStatInfo

  • All Implemented Interfaces:
    Pointer

    public class VmaStatInfo
    extends Struct
    Calculated statistics of memory usage in entire allocator.

    Member documentation

    • blockCount – number of VkDeviceMemory Vulkan memory blocks allocated
    • allocationCount – number of VmaAllocation allocation objects allocated
    • unusedRangeCount – number of free ranges of memory between allocations
    • usedBytes – total number of bytes occupied by all allocations
    • unusedBytes – total number of bytes occupied by unused ranges

    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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • blockCount

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

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

        public int unusedRangeCount()
        Returns the value of the unusedRangeCount field.
      • usedBytes

        public long usedBytes()
        Returns the value of the usedBytes field.
      • unusedBytes

        public long unusedBytes()
        Returns the value of the unusedBytes field.
      • 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.
      • 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.
      • 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.
      • 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().