pub struct Memory<'a> {
pub range: Range<u64>,
pub allocation_base: u64,
pub allocation_protect: u32,
pub state: u32,
pub protect: u32,
pub type_: u32,
pub data: &'a [u8],
}Expand description
Represents a memory region in a minidump file, providing metadata about its state, protection level, allocation base, and type.
Fields§
§range: Range<u64>The range of memory addresses for this region.
allocation_base: u64The base address where this memory allocation begins.
allocation_protect: u32The protection attributes applied at the time of memory allocation.
state: u32The current state of the memory region, indicating if it’s committed,
reserved, or free (e.g., MEM_COMMIT or MEM_FREE).
protect: u32The protection level of the memory region (e.g., PAGE_READWRITE).
type_: u32The type of memory region (e.g., private, mapped, or image).
data: &'a [u8]The raw bytes of the memory region, as extracted from the minidump file. This data represents the actual content of the memory in this region and can be used for further analysis or reconstruction.
Implementations§
Source§impl<'a> Memory<'a>
impl<'a> Memory<'a>
Sourcepub fn state(&self) -> &str
pub fn state(&self) -> &str
Returns a textual description of the current memory state.
The possible states are:
MEM_COMMIT(0x1000): Memory is committed and backed by physical storage or the page file.MEM_RESERVE(0x2000): Memory is reserved but not yet committed.MEM_FREE(0x10000): Memory is free and available for allocation.MEM_RESET(0x8000): Memory has been reset to a clean state.MEM_TOP_DOWN(0x100000): Allocation was made top-down from high memory addresses.
§Returns
Describing the state of the memory.
Sourcepub fn type_memory(&self) -> &str
pub fn type_memory(&self) -> &str
Returns a textual description of the memory type.
The possible types are:
MEM_PRIVATE(0x20000): Memory is private to the process.MEM_MAPPED(0x40000): Memory is mapped to a file.MEM_IMAGE(0x1000000): Memory is associated with an executable image.
§Returns
Describing the type of the memory region.
Sourcepub fn start_addr(&self) -> u64
pub fn start_addr(&self) -> u64
Returns the starting address of the memory region.
§Returns
The starting address of the memory region.
Sourcepub fn end_addr(&self) -> u64
pub fn end_addr(&self) -> u64
Returns the ending address of the memory region (inclusive).
§Returns
The ending address of the memory region.