Trait datafusion_execution::memory_pool::proxy::VecAllocExt
source · pub trait VecAllocExt {
type T;
// Required methods
fn push_accounted(&mut self, x: Self::T, accounting: &mut usize);
fn allocated_size(&self) -> usize;
}
Expand description
Extension trait for Vec
to account for allocations.
Required Associated Types§
Required Methods§
sourcefn push_accounted(&mut self, x: Self::T, accounting: &mut usize)
fn push_accounted(&mut self, x: Self::T, accounting: &mut usize)
Push new element to vector and store additional allocated bytes in accounting
(additive).
sourcefn allocated_size(&self) -> usize
fn allocated_size(&self) -> usize
Return the amount of memory allocated by this Vec (not
recursively counting any heap allocations contained within the
structure). Does not include the size of self