pub struct HeapScanner;Expand description
HeapScanner reads heap memory for active allocations during snapshot analysis.
All memory reads are validated through ValidRegions to prevent segfaults.
This module only operates during offline analysis and has zero runtime overhead.
Implementations§
Source§impl HeapScanner
impl HeapScanner
Sourcepub fn scan(allocations: &[ActiveAllocation]) -> Vec<ScanResult>
pub fn scan(allocations: &[ActiveAllocation]) -> Vec<ScanResult>
Scan a list of active allocations, reading their memory content.
Only scans HeapOwner allocations and performs deduplication to avoid redundant scanning of duplicate heap regions.
Returns a ScanResult for each unique heap region. Allocations whose
pointers fall outside valid regions will have memory: None.
§Arguments
allocations- List of active allocations to scan.
§Example
ⓘ
let results = HeapScanner::scan(&allocations);
for result in results {
if let Some(ref memory) = result.memory {
let view = MemoryView::new(memory);
// ... pass to UTI Engine
}
}Auto Trait Implementations§
impl Freeze for HeapScanner
impl RefUnwindSafe for HeapScanner
impl Send for HeapScanner
impl Sync for HeapScanner
impl Unpin for HeapScanner
impl UnsafeUnpin for HeapScanner
impl UnwindSafe for HeapScanner
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more