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§
Sourcefn capture_alloc(&self, ptr: usize, size: usize, thread_id: u64) -> MemoryEvent
fn capture_alloc(&self, ptr: usize, size: usize, thread_id: u64) -> MemoryEvent
Capture an allocation event
Sourcefn capture_dealloc(
&self,
ptr: usize,
size: usize,
thread_id: u64,
) -> MemoryEvent
fn capture_dealloc( &self, ptr: usize, size: usize, thread_id: u64, ) -> MemoryEvent
Capture a deallocation event
Sourcefn capture_realloc(
&self,
ptr: usize,
old_size: usize,
new_size: usize,
thread_id: u64,
) -> MemoryEvent
fn capture_realloc( &self, ptr: usize, old_size: usize, new_size: usize, thread_id: u64, ) -> MemoryEvent
Capture a reallocation event
Sourcefn capture_move(
&self,
_from_ptr: usize,
to_ptr: usize,
size: usize,
thread_id: u64,
) -> MemoryEvent
fn capture_move( &self, _from_ptr: usize, to_ptr: usize, size: usize, thread_id: u64, ) -> MemoryEvent
Capture a move event