Package org.lwjgl.util.vma
Class VmaPoolStats
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.vma.VmaPoolStats
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VmaPoolStats extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Describes parameter of existingVmaPool
.Member documentation
size
– total amount ofVkDeviceMemory
allocated from Vulkan for this pool, in bytesunusedSize
– total number of bytes in the pool not used by anyVmaAllocation
allocationCount
– number ofVmaAllocation
objects created from this pool that were not destroyed or lostunusedRangeCount
– number of continuous memory ranges in the pool not used by anyVmaAllocation
unusedRangeSizeMax
– size of the largest continuous free memory region available for new allocation.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.
blockCount
– number ofVkDeviceMemory
blocks allocated for this pool
Layout
struct VmaPoolStats { VkDeviceSize size; VkDeviceSize unusedSize; size_t allocationCount; size_t unusedRangeCount; VkDeviceSize unusedRangeSizeMax; size_t blockCount; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VmaPoolStats.Buffer
An array ofVmaPoolStats
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ALLOCATIONCOUNT
BLOCKCOUNT
SIZEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
UNUSEDRANGECOUNT
UNUSEDRANGESIZEMAX
UNUSEDSIZEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VmaPoolStats(java.nio.ByteBuffer container)
Creates aVmaPoolStats
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
allocationCount()
Returns the value of theallocationCount
field.long
blockCount()
Returns the value of theblockCount
field.static VmaPoolStats
calloc()
Returns a newVmaPoolStats
instance allocated withmemCalloc
.static VmaPoolStats.Buffer
calloc(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated withmemCalloc
.static VmaPoolStats
callocStack()
Returns a newVmaPoolStats
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VmaPoolStats.Buffer
callocStack(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VmaPoolStats.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaPoolStats.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaPoolStats
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaPoolStats
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VmaPoolStats
create()
Returns a newVmaPoolStats
instance allocated withBufferUtils
.static VmaPoolStats.Buffer
create(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated withBufferUtils
.static VmaPoolStats
create(long address)
Returns a newVmaPoolStats
instance for the specified memory address.static VmaPoolStats.Buffer
create(long address, int capacity)
Create aVmaPoolStats.Buffer
instance at the specified memory.static VmaPoolStats
createSafe(long address)
static VmaPoolStats.Buffer
createSafe(long address, int capacity)
static VmaPoolStats
malloc()
Returns a newVmaPoolStats
instance allocated withmemAlloc
.static VmaPoolStats.Buffer
malloc(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated withmemAlloc
.static VmaPoolStats
mallocStack()
Returns a newVmaPoolStats
instance allocated on the thread-localMemoryStack
.static VmaPoolStats.Buffer
mallocStack(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated on the thread-localMemoryStack
.static VmaPoolStats.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaPoolStats.Buffer
instance allocated on the specifiedMemoryStack
.static VmaPoolStats
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaPoolStats
instance allocated on the specifiedMemoryStack
.static long
nallocationCount(long struct)
Unsafe version ofallocationCount()
.static long
nblockCount(long struct)
Unsafe version ofblockCount()
.static long
nsize(long struct)
Unsafe version ofsize()
.static long
nunusedRangeCount(long struct)
Unsafe version ofunusedRangeCount()
.static long
nunusedRangeSizeMax(long struct)
Unsafe version ofunusedRangeSizeMax()
.static long
nunusedSize(long struct)
Unsafe version ofunusedSize()
.long
size()
Returns the value of thesize
field.int
sizeof()
long
unusedRangeCount()
Returns the value of theunusedRangeCount
field.long
unusedRangeSizeMax()
Returns the value of theunusedRangeSizeMax
field.long
unusedSize()
Returns the value of theunusedSize
field.
-
-
-
Constructor Detail
-
VmaPoolStats
public VmaPoolStats(java.nio.ByteBuffer container)
Creates aVmaPoolStats
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
-
size
public long size()
Returns the value of thesize
field.
-
unusedSize
public long unusedSize()
Returns the value of theunusedSize
field.
-
allocationCount
public long allocationCount()
Returns the value of theallocationCount
field.
-
unusedRangeCount
public long unusedRangeCount()
Returns the value of theunusedRangeCount
field.
-
unusedRangeSizeMax
public long unusedRangeSizeMax()
Returns the value of theunusedRangeSizeMax
field.
-
blockCount
public long blockCount()
Returns the value of theblockCount
field.
-
malloc
public static VmaPoolStats malloc()
Returns a newVmaPoolStats
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VmaPoolStats calloc()
Returns a newVmaPoolStats
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VmaPoolStats create()
Returns a newVmaPoolStats
instance allocated withBufferUtils
.
-
create
public static VmaPoolStats create(long address)
Returns a newVmaPoolStats
instance for the specified memory address.
-
createSafe
@Nullable public static VmaPoolStats createSafe(long address)
-
malloc
public static VmaPoolStats.Buffer malloc(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VmaPoolStats.Buffer calloc(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VmaPoolStats.Buffer create(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VmaPoolStats.Buffer create(long address, int capacity)
Create aVmaPoolStats.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VmaPoolStats.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VmaPoolStats mallocStack()
Returns a newVmaPoolStats
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VmaPoolStats callocStack()
Returns a newVmaPoolStats
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VmaPoolStats mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaPoolStats
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VmaPoolStats callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVmaPoolStats
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VmaPoolStats.Buffer mallocStack(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VmaPoolStats.Buffer callocStack(int capacity)
Returns a newVmaPoolStats.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VmaPoolStats.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaPoolStats.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VmaPoolStats.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaPoolStats.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nsize
public static long nsize(long struct)
Unsafe version ofsize()
.
-
nunusedSize
public static long nunusedSize(long struct)
Unsafe version ofunusedSize()
.
-
nallocationCount
public static long nallocationCount(long struct)
Unsafe version ofallocationCount()
.
-
nunusedRangeCount
public static long nunusedRangeCount(long struct)
Unsafe version ofunusedRangeCount()
.
-
nunusedRangeSizeMax
public static long nunusedRangeSizeMax(long struct)
Unsafe version ofunusedRangeSizeMax()
.
-
nblockCount
public static long nblockCount(long struct)
Unsafe version ofblockCount()
.
-
-