Class VmaDefragmentationStats

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

    public class VmaDefragmentationStats
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Statistics returned by function Defragment.

    Member documentation

    • bytesMoved – total number of bytes that have been copied while moving allocations to different places
    • bytesFreed – total number of bytes that have been released to the system by freeing empty VkDeviceMemory objects
    • allocationsMoved – tumber of allocations that have been moved to different places
    • deviceMemoryBlocksFreed – number of empty VkDeviceMemory objects that have been released to the system

    Layout

    
     struct VmaDefragmentationStats {
         VkDeviceSize bytesMoved;
         VkDeviceSize bytesFreed;
         uint32_t allocationsMoved;
         uint32_t deviceMemoryBlocksFreed;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • BYTESMOVED, BYTESFREED, ALLOCATIONSMOVED, DEVICEMEMORYBLOCKSFREED

        The struct member offsets.
    • Constructor Detail

      • VmaDefragmentationStats

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

        public long bytesMoved()
        Returns the value of the bytesMoved field.
      • bytesFreed

        public long bytesFreed()
        Returns the value of the bytesFreed field.
      • allocationsMoved

        public int allocationsMoved()
        Returns the value of the allocationsMoved field.
      • deviceMemoryBlocksFreed

        public int deviceMemoryBlocksFreed()
        Returns the value of the deviceMemoryBlocksFreed field.
      • malloc

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

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

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

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

        public static VmaDefragmentationStats mallocStack()
        Returns a new VmaDefragmentationStats instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VmaDefragmentationStats callocStack()
        Returns a new VmaDefragmentationStats instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

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

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

        public static VmaDefragmentationStats.Buffer callocStack​(int capacity,
                                                                 org.lwjgl.system.MemoryStack stack)
        Returns a new VmaDefragmentationStats.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
      • nbytesMoved

        public static long nbytesMoved​(long struct)
        Unsafe version of bytesMoved().
      • nbytesFreed

        public static long nbytesFreed​(long struct)
        Unsafe version of bytesFreed().
      • nallocationsMoved

        public static int nallocationsMoved​(long struct)
        Unsafe version of allocationsMoved().
      • ndeviceMemoryBlocksFreed

        public static int ndeviceMemoryBlocksFreed​(long struct)
        Unsafe version of deviceMemoryBlocksFreed().