Module shadow_rs::host::memory_manager
source · Expand description
Access and manage memory of a plugin process.
The starting point for the public API is MemoryManager
.
MemoryManager
can be used to:
- Directly read or write process memory
- Obtain smart pointers (
ProcessMemoryRef
andProcessMemoryRefMut
) to process memory - Obtain cursors to process memory implementing
std::io::Seek
and eitherstd::io::Read
orstd::io::Write
(MemoryReaderCursor
andMemoryWriterCursor
)
For the MemoryManager
to maintain a consistent view of the process’s address space,
and for it to be able to enforce Rust’s safety requirements for references and sharing,
all access to process memory must go through it. This includes servicing syscalls that
modify the process address space (such as mmap
).
Structs§
- Memory allocated by Shadow, in a remote address space.
- Provides accessors for reading and writing another process’s memory.
- An object implementing std::io::Read and std::io::Seek for a range of plugin memory.
- An object implementing std::io::Write and std::io::Seek for a range of plugin memory.
- An immutable reference to a slice of plugin memory. Implements
Deref<[T]>
, allowing, e.g.: - A mutable reference to a slice of plugin memory. Implements
DerefMut<[T]>
, allowing, e.g.: