Skip to main content

CaptureBackend

Trait CaptureBackend 

Source
pub trait CaptureBackend: Send + Sync {
    // Required methods
    fn capture_alloc(
        &self,
        ptr: usize,
        size: usize,
        thread_id: u64,
    ) -> MemoryEvent;
    fn capture_dealloc(
        &self,
        ptr: usize,
        size: usize,
        thread_id: u64,
    ) -> MemoryEvent;
    fn capture_realloc(
        &self,
        ptr: usize,
        old_size: usize,
        new_size: usize,
        thread_id: u64,
    ) -> MemoryEvent;
    fn capture_move(
        &self,
        _from_ptr: usize,
        to_ptr: usize,
        size: usize,
        thread_id: u64,
    ) -> MemoryEvent;
}
Expand description

Capture Backend trait

All capture backends must implement this trait to provide a unified interface for capturing memory events.

Required Methods§

Source

fn capture_alloc(&self, ptr: usize, size: usize, thread_id: u64) -> MemoryEvent

Capture an allocation event

Source

fn capture_dealloc( &self, ptr: usize, size: usize, thread_id: u64, ) -> MemoryEvent

Capture a deallocation event

Source

fn capture_realloc( &self, ptr: usize, old_size: usize, new_size: usize, thread_id: u64, ) -> MemoryEvent

Capture a reallocation event

Source

fn capture_move( &self, _from_ptr: usize, to_ptr: usize, size: usize, thread_id: u64, ) -> MemoryEvent

Capture a move event

Implementors§