Struct vk_mem_alloc::ffi::VmaStatistics
source · [−]#[repr(C)]pub struct VmaStatistics {
pub blockCount: u32,
pub allocationCount: u32,
pub blockBytes: DeviceSize,
pub allocationBytes: DeviceSize,
}
Expand description
\brief Calculated statistics of memory usage e.g. in a specific memory type, heap, custom pool, or total.
These are fast to calculate. See functions: vmaGetHeapBudgets(), vmaGetPoolStatistics().
Fields
blockCount: u32
\brief Number of VkDeviceMemory
objects - Vulkan memory blocks allocated.
allocationCount: u32
\brief Number of #VmaAllocation objects allocated.
Dedicated allocations have their own blocks, so each one adds 1 to allocationCount
as well as blockCount
.
blockBytes: DeviceSize
\brief Number of bytes allocated in VkDeviceMemory
blocks.
\note To avoid confusion, please be aware that what Vulkan calls an “allocation” - a whole VkDeviceMemory
object
(e.g. as in VkPhysicalDeviceLimits::maxMemoryAllocationCount
) is called a “block” in VMA, while VMA calls
“allocation” a #VmaAllocation object that represents a memory region sub-allocated from such block, usually for a single buffer or image.
allocationBytes: DeviceSize
\brief Total number of bytes occupied by all #VmaAllocation objects.
Always less or equal than blockBytes
.
Difference (blockBytes - allocationBytes)
is the amount of memory allocated from Vulkan
but unused by any #VmaAllocation.
Auto Trait Implementations
impl RefUnwindSafe for VmaStatistics
impl Send for VmaStatistics
impl Sync for VmaStatistics
impl Unpin for VmaStatistics
impl UnwindSafe for VmaStatistics
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more