Struct vk_mem_alloc::ffi::VmaBudget
source · [−]#[repr(C)]pub struct VmaBudget {
pub statistics: VmaStatistics,
pub usage: DeviceSize,
pub budget: DeviceSize,
}
Expand description
\brief Statistics of current memory usage and available budget for a specific memory heap.
These are fast to calculate. See function vmaGetHeapBudgets().
Fields
statistics: VmaStatistics
\brief Statistics fetched from the library.
usage: DeviceSize
\brief Estimated current memory usage of the program, in bytes.
Fetched from system using VK_EXT_memory_budget extension if enabled.
It might be different than statistics.blockBytes
(usually higher) due to additional implicit objects
also occupying the memory, like swapchain, pipelines, descriptor heaps, command buffers, or
VkDeviceMemory
blocks allocated outside of this library, if any.
budget: DeviceSize
\brief Estimated amount of memory available to the program, in bytes.
Fetched from system using VK_EXT_memory_budget extension if enabled.
It might be different (most probably smaller) than VkMemoryHeap::size[heapIndex]
due to factors
external to the program, decided by the operating system.
Difference budget - usage
is the amount of additional memory that can probably
be allocated without problems. Exceeding the budget may result in various problems.
Auto Trait Implementations
impl RefUnwindSafe for VmaBudget
impl Send for VmaBudget
impl Sync for VmaBudget
impl Unpin for VmaBudget
impl UnwindSafe for VmaBudget
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