pub struct ProcessMemoryMap {
pub regions: Vec<MemoryRegion>,
pub total_mapped: usize,
pub executable_regions: usize,
pub writable_regions: usize,
pub private_regions: usize,
}
Expand description
Represents the complete memory map of a debugged process
A ProcessMemoryMap
contains a collection of memory regions and summary statistics
about the process’s memory usage.
§Examples
use coreminer::memorymap::ProcessMemoryMap;
use proc_maps::get_process_maps;
// Get the memory map for the current process
let maps = get_process_maps(std::process::id() as i32).unwrap();
let memory_map = ProcessMemoryMap::from(maps);
// Print the memory map summary
println!("Total mapped memory: {} bytes", memory_map.total_mapped);
println!("Number of regions: {}", memory_map.regions.len());
println!("Executable regions: {}", memory_map.executable_regions);
println!("Writable regions: {}", memory_map.writable_regions);
// Iterate through regions
for region in &memory_map.regions {
println!("Region at {:x} - {:x}: {} bytes",
region.start_address.usize(),
region.end_address.usize(),
region.size);
}
Fields§
§regions: Vec<MemoryRegion>
List of memory regions in the process
total_mapped: usize
Total amount of mapped memory in bytes
executable_regions: usize
Number of executable memory regions
writable_regions: usize
Number of writable memory regions
private_regions: usize
Number of private memory regions
Trait Implementations§
Source§impl Clone for ProcessMemoryMap
impl Clone for ProcessMemoryMap
Source§fn clone(&self) -> ProcessMemoryMap
fn clone(&self) -> ProcessMemoryMap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProcessMemoryMap
impl Debug for ProcessMemoryMap
Source§impl Display for ProcessMemoryMap
impl Display for ProcessMemoryMap
Auto Trait Implementations§
impl Freeze for ProcessMemoryMap
impl RefUnwindSafe for ProcessMemoryMap
impl Send for ProcessMemoryMap
impl Sync for ProcessMemoryMap
impl Unpin for ProcessMemoryMap
impl UnwindSafe for ProcessMemoryMap
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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