Package org.lwjgl.util.vma
Class VmaStats
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.vma.VmaStats
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VmaStats extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
General statistics from current state of Allocator.Layout
struct VmaStats {
VmaStatInfo
memoryType[32];VmaStatInfo
memoryHeap[16];VmaStatInfo
total; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VmaStats.Buffer
An array ofVmaStats
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MEMORYHEAP
MEMORYTYPEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TOTAL
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VmaStats(java.nio.ByteBuffer container)
Creates aVmaStats
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VmaStats
calloc()
Returns a newVmaStats
instance allocated withmemCalloc
.static VmaStats.Buffer
calloc(int capacity)
Returns a newVmaStats.Buffer
instance allocated withmemCalloc
.static VmaStats
callocStack()
Returns a newVmaStats
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VmaStats.Buffer
callocStack(int capacity)
Returns a newVmaStats.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VmaStats.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaStats.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaStats
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaStats
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaStats
create()
Returns a newVmaStats
instance allocated withBufferUtils
.static VmaStats.Buffer
create(int capacity)
Returns a newVmaStats.Buffer
instance allocated withBufferUtils
.static VmaStats
create(long address)
Returns a newVmaStats
instance for the specified memory address.static VmaStats.Buffer
create(long address, int capacity)
Create aVmaStats.Buffer
instance at the specified memory.static VmaStats
createSafe(long address)
static VmaStats.Buffer
createSafe(long address, int capacity)
static VmaStats
malloc()
Returns a newVmaStats
instance allocated withmemAlloc
.static VmaStats.Buffer
malloc(int capacity)
Returns a newVmaStats.Buffer
instance allocated withmemAlloc
.static VmaStats
mallocStack()
Returns a newVmaStats
instance allocated on the thread-localMemoryStack
.static VmaStats.Buffer
mallocStack(int capacity)
Returns a newVmaStats.Buffer
instance allocated on the thread-localMemoryStack
.static VmaStats.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaStats.Buffer
instance allocated on the specifiedMemoryStack
.static VmaStats
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaStats
instance allocated on the specifiedMemoryStack
.VmaStatInfo.Buffer
memoryHeap()
Returns aVmaStatInfo
.Buffer view of thememoryHeap
field.VmaStatInfo
memoryHeap(int index)
Returns aVmaStatInfo
view of the struct at the specified index of thememoryHeap
field.VmaStatInfo.Buffer
memoryType()
Returns aVmaStatInfo
.Buffer view of thememoryType
field.VmaStatInfo
memoryType(int index)
Returns aVmaStatInfo
view of the struct at the specified index of thememoryType
field.static VmaStatInfo.Buffer
nmemoryHeap(long struct)
Unsafe version ofmemoryHeap()
.static VmaStatInfo
nmemoryHeap(long struct, int index)
Unsafe version ofmemoryHeap
.static VmaStatInfo.Buffer
nmemoryType(long struct)
Unsafe version ofmemoryType()
.static VmaStatInfo
nmemoryType(long struct, int index)
Unsafe version ofmemoryType
.static VmaStatInfo
ntotal(long struct)
Unsafe version oftotal()
.int
sizeof()
VmaStatInfo
total()
Returns aVmaStatInfo
view of thetotal
field.
-
-
-
Constructor Detail
-
VmaStats
public VmaStats(java.nio.ByteBuffer container)
Creates aVmaStats
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
-
memoryType
public VmaStatInfo.Buffer memoryType()
Returns aVmaStatInfo
.Buffer view of thememoryType
field.
-
memoryType
public VmaStatInfo memoryType(int index)
Returns aVmaStatInfo
view of the struct at the specified index of thememoryType
field.
-
memoryHeap
public VmaStatInfo.Buffer memoryHeap()
Returns aVmaStatInfo
.Buffer view of thememoryHeap
field.
-
memoryHeap
public VmaStatInfo memoryHeap(int index)
Returns aVmaStatInfo
view of the struct at the specified index of thememoryHeap
field.
-
total
public VmaStatInfo total()
Returns aVmaStatInfo
view of thetotal
field.
-
malloc
public static VmaStats malloc()
Returns a newVmaStats
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VmaStats calloc()
Returns a newVmaStats
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VmaStats create()
Returns a newVmaStats
instance allocated withBufferUtils
.
-
create
public static VmaStats create(long address)
Returns a newVmaStats
instance for the specified memory address.
-
createSafe
@Nullable public static VmaStats createSafe(long address)
-
malloc
public static VmaStats.Buffer malloc(int capacity)
Returns a newVmaStats.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VmaStats.Buffer calloc(int capacity)
Returns a newVmaStats.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VmaStats.Buffer create(int capacity)
Returns a newVmaStats.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VmaStats.Buffer create(long address, int capacity)
Create aVmaStats.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VmaStats.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VmaStats mallocStack()
Returns a newVmaStats
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VmaStats callocStack()
Returns a newVmaStats
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VmaStats mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaStats
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VmaStats callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaStats
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VmaStats.Buffer mallocStack(int capacity)
Returns a newVmaStats.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VmaStats.Buffer callocStack(int capacity)
Returns a newVmaStats.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VmaStats.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaStats.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VmaStats.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaStats.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nmemoryType
public static VmaStatInfo.Buffer nmemoryType(long struct)
Unsafe version ofmemoryType()
.
-
nmemoryType
public static VmaStatInfo nmemoryType(long struct, int index)
Unsafe version ofmemoryType
.
-
nmemoryHeap
public static VmaStatInfo.Buffer nmemoryHeap(long struct)
Unsafe version ofmemoryHeap()
.
-
nmemoryHeap
public static VmaStatInfo nmemoryHeap(long struct, int index)
Unsafe version ofmemoryHeap
.
-
ntotal
public static VmaStatInfo ntotal(long struct)
Unsafe version oftotal()
.
-
-