pub struct MemoryProfiler { /* private fields */ }
Expand description
Memory profiler for tracking allocations
Implementations§
Source§impl MemoryProfiler
impl MemoryProfiler
pub fn new() -> Self
pub fn enable(&mut self)
pub fn disable(&mut self)
pub fn track_allocation( &self, address: usize, size: usize, alloc_type: AllocationType, tag: Option<String>, )
pub fn track_deallocation(&self, address: usize)
pub fn get_current_usage(&self) -> HashMap<AllocationType, usize>
pub fn get_peak_usage(&self) -> HashMap<AllocationType, usize>
pub fn get_total_current_usage(&self) -> usize
pub fn get_total_peak_usage(&self) -> usize
pub fn get_active_allocations(&self) -> Vec<AllocationEvent>
pub fn get_allocation_history(&self) -> Vec<AllocationEvent>
pub fn find_leaks(&self) -> Vec<AllocationEvent>
pub fn print_summary(&self)
pub fn analyze_fragmentation(&self) -> FragmentationAnalysis
pub fn export_timeline(&self, path: &str) -> Result<(), CudaRustError>
pub fn clear(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryProfiler
impl RefUnwindSafe for MemoryProfiler
impl Send for MemoryProfiler
impl Sync for MemoryProfiler
impl Unpin for MemoryProfiler
impl UnwindSafe for MemoryProfiler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more