Class VmaPoolStats

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

    public class VmaPoolStats
    extends Struct
    implements NativeResource

    Member documentation

    • size – total amount of VkDeviceMemory allocated from Vulkan for this pool, in bytes
    • unusedSize – total number of bytes in the pool not used by any VmaAllocation
    • allocationCount – number of VmaAllocation objects created from this pool that were not destroyed or lost
    • unusedRangeCount – number of continuous memory ranges in the pool not used by any VmaAllocation
    • unusedRangeSizeMax – size of the largest continuous free memory region.

      Making a new allocation of that size is not guaranteed to succeed because of possible additional margin required to respect alignment and buffer/imag granularity.

    Layout

    
     struct VmaPoolStats {
         VkDeviceSize size;
         VkDeviceSize unusedSize;
         size_t allocationCount;
         size_t unusedRangeCount;
         VkDeviceSize unusedRangeSizeMax;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • SIZE, UNUSEDSIZE, ALLOCATIONCOUNT, UNUSEDRANGECOUNT, UNUSEDRANGESIZEMAX

        The struct member offsets.
    • Constructor Detail

      • VmaPoolStats

        public VmaPoolStats​(java.nio.ByteBuffer container)
        Creates a VmaPoolStats 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
      • size

        public long size()
        Returns the value of the size field.
      • unusedSize

        public long unusedSize()
        Returns the value of the unusedSize field.
      • allocationCount

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

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

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

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

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

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

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

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

        public static VmaPoolStats.Buffer callocStack​(int capacity)
        Returns a new VmaPoolStats.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static VmaPoolStats.Buffer callocStack​(int capacity,
                                                      MemoryStack stack)
        Returns a new VmaPoolStats.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
      • nsize

        public static long nsize​(long struct)
        Unsafe version of size().
      • nunusedSize

        public static long nunusedSize​(long struct)
        Unsafe version of unusedSize().
      • nallocationCount

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

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

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