https://github.com/jabedude/procmaps
Provides Rust interface to get current memory mappings for a given process
https://github.com/jabedude/procmaps
linux memory process procfs virtual-memory
Last synced: about 2 months ago
JSON representation
Provides Rust interface to get current memory mappings for a given process
- Host: GitHub
- URL: https://github.com/jabedude/procmaps
- Owner: jabedude
- Created: 2018-12-28T18:16:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-09-07T14:14:03.000Z (over 2 years ago)
- Last Synced: 2025-04-09T16:01:20.488Z (about 2 months ago)
- Topics: linux, memory, process, procfs, virtual-memory
- Language: Rust
- Homepage:
- Size: 23.4 KB
- Stars: 17
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust procmaps - retrieve process memory maps
A library for retrieving information about memory mappings for Unix processes.
To use, add this line to your Cargo.toml:
```toml
[dependencies]
procmaps = "0.4.2"
```
## Example
```rust
use procmaps::Mappings;let mappings = Mappings::from_pid(pid).unwrap();
for mapping in mappings.iter() {
if mapping.perms.executable {
println!("Region: {:x} - {:x} Size: {}", mapping.base, mapping.ceiling, mapping.size_of_mapping());
}
}
```