Record Class VmaDetailedStatistics
- All Implemented Interfaces:
IPointer
,IVmaDetailedStatistics
More detailed statistics than VmaStatistics
.
These are slower to calculate. Use for debugging purposes. See functions: vmaCalculateStatistics(), vmaCalculatePoolStatistics().
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;
Structure
typedef struct VmaDetailedStatistics {
VmaStatistics
statistics
;
uint32_t unusedRangeCount
;
VkDeviceSize allocationSizeMin
;
VkDeviceSize allocationSizeMax
;
VkDeviceSize unusedRangeSizeMin
;
VkDeviceSize unusedRangeSizeMax
;
} VmaDetailedStatistics;
Contracts
The property segment()
should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)
), and properly aligned to
LAYOUT.byteAlignment()
bytes. To represent null pointer, you may use a Java
null
instead. See the documentation of IPointer.segment()
for more details.
The constructor of this class is marked as UnsafeConstructor
, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
Member documentation
statistics()
Basic statistics.unusedRangeCount()
Number of free ranges of memory between allocations.allocationSizeMin()
Smallest allocation size. `VK_WHOLE_SIZE` if there are 0 allocations.allocationSizeMax()
Largest allocation size. 0 if there are 0 allocations.unusedRangeSizeMin()
Smallest empty range size. `VK_WHOLE_SIZE` if there are 0 empty ranges.unusedRangeSizeMax()
Largest empty range size. 0 if there are 0 empty ranges.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final ValueLayout.OfLong
static final ValueLayout.OfLong
static final StructLayout
static final ValueLayout.OfInt
static final ValueLayout.OfLong
static final ValueLayout.OfLong
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionVmaDetailedStatistics
(@NotNull MemorySegment segment) Creates an instance of aVmaDetailedStatistics
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VmaDetailedStatistics
static VmaDetailedStatistics.Ptr
long
allocationSizeMax
(long value) long
allocationSizeMin
(long value) static VmaDetailedStatistics
clone
(Arena arena, VmaDetailedStatistics src) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull MemorySegment
segment()
Returns the value of thesegment
record component.@NotNull VmaStatistics
statistics
(@NotNull VmaStatistics value) statistics
(Consumer<@NotNull VmaStatistics> consumer) final String
toString()
Returns a string representation of this record class.int
unusedRangeCount
(int value) long
unusedRangeSizeMax
(long value) long
unusedRangeSizeMin
(long value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$statistics
-
PATH$unusedRangeCount
-
PATH$allocationSizeMin
-
PATH$allocationSizeMax
-
PATH$unusedRangeSizeMin
-
PATH$unusedRangeSizeMax
-
LAYOUT$statistics
-
LAYOUT$unusedRangeCount
-
LAYOUT$allocationSizeMin
-
LAYOUT$allocationSizeMax
-
LAYOUT$unusedRangeSizeMin
-
LAYOUT$unusedRangeSizeMax
-
SIZE$statistics
public static final long SIZE$statistics -
SIZE$unusedRangeCount
public static final long SIZE$unusedRangeCount -
SIZE$allocationSizeMin
public static final long SIZE$allocationSizeMin -
SIZE$allocationSizeMax
public static final long SIZE$allocationSizeMax -
SIZE$unusedRangeSizeMin
public static final long SIZE$unusedRangeSizeMin -
SIZE$unusedRangeSizeMax
public static final long SIZE$unusedRangeSizeMax -
OFFSET$statistics
public static final long OFFSET$statistics -
OFFSET$unusedRangeCount
public static final long OFFSET$unusedRangeCount -
OFFSET$allocationSizeMin
public static final long OFFSET$allocationSizeMin -
OFFSET$allocationSizeMax
public static final long OFFSET$allocationSizeMax -
OFFSET$unusedRangeSizeMin
public static final long OFFSET$unusedRangeSizeMin -
OFFSET$unusedRangeSizeMax
public static final long OFFSET$unusedRangeSizeMax
-
-
Constructor Details
-
VmaDetailedStatistics
Creates an instance of aVmaDetailedStatistics
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
statistics
-
statistics
-
statistics
-
unusedRangeCount
-
unusedRangeCount
-
allocationSizeMin
-
allocationSizeMin
-
allocationSizeMax
-
allocationSizeMax
-
unusedRangeSizeMin
-
unusedRangeSizeMin
-
unusedRangeSizeMax
-
unusedRangeSizeMax
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
segment
Returns the value of thesegment
record component.
-