Package org.lwjgl.util.vma
Class VmaDefragmentationStats
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.vma.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 functionDefragment
.Member documentation
bytesMoved
– total number of bytes that have been copied while moving allocations to different placesbytesFreed
– total number of bytes that have been released to the system by freeing emptyVkDeviceMemory
objectsallocationsMoved
– tumber of allocations that have been moved to different placesdeviceMemoryBlocksFreed
– number of emptyVkDeviceMemory
objects that have been released to the system
Layout
struct VmaDefragmentationStats { VkDeviceSize bytesMoved; VkDeviceSize bytesFreed; uint32_t allocationsMoved; uint32_t deviceMemoryBlocksFreed; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VmaDefragmentationStats.Buffer
An array ofVmaDefragmentationStats
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ALLOCATIONSMOVED
BYTESFREED
BYTESMOVED
DEVICEMEMORYBLOCKSFREEDThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VmaDefragmentationStats(java.nio.ByteBuffer container)
Creates aVmaDefragmentationStats
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
allocationsMoved()
Returns the value of theallocationsMoved
field.long
bytesFreed()
Returns the value of thebytesFreed
field.long
bytesMoved()
Returns the value of thebytesMoved
field.static VmaDefragmentationStats
calloc()
Returns a newVmaDefragmentationStats
instance allocated withmemCalloc
.static VmaDefragmentationStats.Buffer
calloc(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated withmemCalloc
.static VmaDefragmentationStats
callocStack()
Returns a newVmaDefragmentationStats
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VmaDefragmentationStats.Buffer
callocStack(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VmaDefragmentationStats.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationStats.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaDefragmentationStats
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationStats
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaDefragmentationStats
create()
Returns a newVmaDefragmentationStats
instance allocated withBufferUtils
.static VmaDefragmentationStats.Buffer
create(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated withBufferUtils
.static VmaDefragmentationStats
create(long address)
Returns a newVmaDefragmentationStats
instance for the specified memory address.static VmaDefragmentationStats.Buffer
create(long address, int capacity)
Create aVmaDefragmentationStats.Buffer
instance at the specified memory.static VmaDefragmentationStats
createSafe(long address)
static VmaDefragmentationStats.Buffer
createSafe(long address, int capacity)
int
deviceMemoryBlocksFreed()
Returns the value of thedeviceMemoryBlocksFreed
field.static VmaDefragmentationStats
malloc()
Returns a newVmaDefragmentationStats
instance allocated withmemAlloc
.static VmaDefragmentationStats.Buffer
malloc(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated withmemAlloc
.static VmaDefragmentationStats
mallocStack()
Returns a newVmaDefragmentationStats
instance allocated on the thread-localMemoryStack
.static VmaDefragmentationStats.Buffer
mallocStack(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated on the thread-localMemoryStack
.static VmaDefragmentationStats.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationStats.Buffer
instance allocated on the specifiedMemoryStack
.static VmaDefragmentationStats
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationStats
instance allocated on the specifiedMemoryStack
.static int
nallocationsMoved(long struct)
Unsafe version ofallocationsMoved()
.static long
nbytesFreed(long struct)
Unsafe version ofbytesFreed()
.static long
nbytesMoved(long struct)
Unsafe version ofbytesMoved()
.static int
ndeviceMemoryBlocksFreed(long struct)
Unsafe version ofdeviceMemoryBlocksFreed()
.int
sizeof()
-
-
-
Constructor Detail
-
VmaDefragmentationStats
public VmaDefragmentationStats(java.nio.ByteBuffer container)
Creates aVmaDefragmentationStats
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
bytesMoved
public long bytesMoved()
Returns the value of thebytesMoved
field.
-
bytesFreed
public long bytesFreed()
Returns the value of thebytesFreed
field.
-
allocationsMoved
public int allocationsMoved()
Returns the value of theallocationsMoved
field.
-
deviceMemoryBlocksFreed
public int deviceMemoryBlocksFreed()
Returns the value of thedeviceMemoryBlocksFreed
field.
-
malloc
public static VmaDefragmentationStats malloc()
Returns a newVmaDefragmentationStats
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VmaDefragmentationStats calloc()
Returns a newVmaDefragmentationStats
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VmaDefragmentationStats create()
Returns a newVmaDefragmentationStats
instance allocated withBufferUtils
.
-
create
public static VmaDefragmentationStats create(long address)
Returns a newVmaDefragmentationStats
instance for the specified memory address.
-
createSafe
@Nullable public static VmaDefragmentationStats createSafe(long address)
-
malloc
public static VmaDefragmentationStats.Buffer malloc(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VmaDefragmentationStats.Buffer calloc(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VmaDefragmentationStats.Buffer create(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VmaDefragmentationStats.Buffer create(long address, int capacity)
Create aVmaDefragmentationStats.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VmaDefragmentationStats.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VmaDefragmentationStats mallocStack()
Returns a newVmaDefragmentationStats
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VmaDefragmentationStats callocStack()
Returns a newVmaDefragmentationStats
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VmaDefragmentationStats mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationStats
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VmaDefragmentationStats callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationStats
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VmaDefragmentationStats.Buffer mallocStack(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VmaDefragmentationStats.Buffer callocStack(int capacity)
Returns a newVmaDefragmentationStats.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VmaDefragmentationStats.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationStats.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VmaDefragmentationStats.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaDefragmentationStats.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nbytesMoved
public static long nbytesMoved(long struct)
Unsafe version ofbytesMoved()
.
-
nbytesFreed
public static long nbytesFreed(long struct)
Unsafe version ofbytesFreed()
.
-
nallocationsMoved
public static int nallocationsMoved(long struct)
Unsafe version ofallocationsMoved()
.
-
ndeviceMemoryBlocksFreed
public static int ndeviceMemoryBlocksFreed(long struct)
Unsafe version ofdeviceMemoryBlocksFreed()
.
-
-