VmaStatistics.
These are slower to calculate. Use for debugging purposes.
Previous version of the statistics API provided averages, but they have been removed because they can be easily calculated as:
VkDeviceSize allocationSizeAvg = detailedStats.statistics.allocationBytes / detailedStats.statistics.allocationCount;
VkDeviceSize unusedBytes = detailedStats.statistics.blockBytes - detailedStats.statistics.allocationBytes;
VkDeviceSize unusedRangeSizeAvg = unusedBytes / detailedStats.unusedRangeCount;
struct VmaDetailedStatistics {
VmaStatistics statistics;
uint32_t unusedRangeCount;
VkDeviceSize allocationSizeMin;
VkDeviceSize allocationSizeMax;
VkDeviceSize unusedRangeSizeMin;
VkDeviceSize unusedRangeSizeMax;
}
Vma#vmaCalculateStatistics, Vma#vmaCalculatePoolStatistics
| Modifier and Type | Class and Description |
|---|---|
| public static class | VmaDetailedStatistics.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | ALLOCATIONSIZEMAX
The struct member offsets. |
| public static final int | ALLOCATIONSIZEMIN
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STATISTICS
The struct member offsets. |
| public static final int | UNUSEDRANGECOUNT
The struct member offsets. |
| public static final int | UNUSEDRANGESIZEMAX
The struct member offsets. |
| public static final int | UNUSEDRANGESIZEMIN
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VmaDetailedStatistics(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public long | |
| public static VmaDetailedStatistics | |
| public static VmaDetailedStatistics. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VmaDetailedStatistics | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VmaDetailedStatistics. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected VmaDetailedStatistics | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VmaDetailedStatistics | |
| public static VmaDetailedStatistics | |
| public static VmaDetailedStatistics. | create(int
the buffer capacity capacity)Returns a new |
| public static VmaDetailedStatistics. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VmaDetailedStatistics | |
| public static VmaDetailedStatistics. | |
| public static VmaDetailedStatistics | |
| public static VmaDetailedStatistics. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VmaDetailedStatistics | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VmaDetailedStatistics. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static long | |
| public static long | |
| public static VmaStatistics | |
| public static int | |
| public static long | |
| public static long | |
| public int | |
| public VmaStatistics | |
| public int | |
| public long | |
| public long |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| ALLOCATIONSIZEMAX | back to summary |
|---|---|
| public static final int ALLOCATIONSIZEMAX The struct member offsets. | |
| ALLOCATIONSIZEMIN | back to summary |
|---|---|
| public static final int ALLOCATIONSIZEMIN The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| STATISTICS | back to summary |
|---|---|
| public static final int STATISTICS The struct member offsets. | |
| UNUSEDRANGECOUNT | back to summary |
|---|---|
| public static final int UNUSEDRANGECOUNT The struct member offsets. | |
| UNUSEDRANGESIZEMAX | back to summary |
|---|---|
| public static final int UNUSEDRANGESIZEMAX The struct member offsets. | |
| UNUSEDRANGESIZEMIN | back to summary |
|---|---|
| public static final int UNUSEDRANGESIZEMIN The struct member offsets. | |
| VmaDetailedStatistics | back to summary |
|---|---|
| protected VmaDetailedStatistics(long address, ByteBuffer container) | |
| VmaDetailedStatistics | back to summary |
|---|---|
| public VmaDetailedStatistics(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| allocationSizeMax | back to summary |
|---|---|
| public long allocationSizeMax() largest allocation size. 0 if there are 0 allocations.
| |
| allocationSizeMin | back to summary |
|---|---|
| public long allocationSizeMin() smallest allocation size.
| |
| calloc | back to summary |
|---|---|
| public static VmaDetailedStatistics calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static VmaDetailedStatistics. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VmaDetailedStatistics calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VmaDetailedStatistics. Returns a new
| |
| create | back to summary |
|---|---|
| protected VmaDetailedStatistics create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static VmaDetailedStatistics create() Returns a new | |
| create | back to summary |
|---|---|
| public static VmaDetailedStatistics create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static VmaDetailedStatistics. Returns a new
| |
| create | back to summary |
|---|---|
| public static VmaDetailedStatistics. Create a
| |
| createSafe | back to summary |
|---|---|
| public static VmaDetailedStatistics createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static VmaDetailedStatistics. Like
| |
| malloc | back to summary |
|---|---|
| public static VmaDetailedStatistics malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static VmaDetailedStatistics. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VmaDetailedStatistics malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VmaDetailedStatistics. Returns a new
| |
| nallocationSizeMax | back to summary |
|---|---|
| public static long nallocationSizeMax(long struct) Unsafe version of | |
| nallocationSizeMin | back to summary |
|---|---|
| public static long nallocationSizeMin(long struct) Unsafe version of | |
| nstatistics | back to summary |
|---|---|
| public static VmaStatistics nstatistics(long struct) Unsafe version of | |
| nunusedRangeCount | back to summary |
|---|---|
| public static int nunusedRangeCount(long struct) Unsafe version of | |
| nunusedRangeSizeMax | back to summary |
|---|---|
| public static long nunusedRangeSizeMax(long struct) Unsafe version of | |
| nunusedRangeSizeMin | back to summary |
|---|---|
| public static long nunusedRangeSizeMin(long struct) Unsafe version of | |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| statistics | back to summary |
|---|---|
| public VmaStatistics statistics() basic statistics | |
| unusedRangeCount | back to summary |
|---|---|
| public int unusedRangeCount() number of free ranges of memory between allocations
| |
| unusedRangeSizeMax | back to summary |
|---|---|
| public long unusedRangeSizeMax() largest empty range size. 0 if there are 0 empty ranges.
| |
| unusedRangeSizeMin | back to summary |
|---|---|
| public long unusedRangeSizeMin() smallest empty range size.
| |
VmaDetailedStatistics structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final VmaDetailedStatistics |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public long | |
| protected VmaDetailedStatistics | |
| protected VmaDetailedStatistics. | |
| public VmaStatistics | |
| public int | |
| public long | |
| public long |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final VmaDetailedStatistics ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| allocationSizeMax | back to summary |
|---|---|
public long allocationSizeMax()
| |
| allocationSizeMin | back to summary |
|---|---|
public long allocationSizeMin()
| |
| getElementFactory | back to summary |
|---|---|
| protected VmaDetailedStatistics getElementFactory() Implements abstract org.
| |
| self | back to summary |
|---|---|
| protected VmaDetailedStatistics. Implements abstract org.
| |
| statistics | back to summary |
|---|---|
public VmaStatistics statistics()
| |
| unusedRangeCount | back to summary |
|---|---|
public int unusedRangeCount()
| |
| unusedRangeSizeMax | back to summary |
|---|---|
public long unusedRangeSizeMax()
| |
| unusedRangeSizeMin | back to summary |
|---|---|
public long unusedRangeSizeMin()
| |