#mem #maps #proc #linux

nightly libprocmem

A /proc/<pid>/mem reading and writing library

3 releases

0.1.2 May 28, 2022
0.1.1 May 28, 2022
0.1.0 May 28, 2022

#918 in Unix APIs


Used in mempeek

BSD-2-Clause

10KB
145 lines

Summary

A very simple library that wraps around /proc/pid/mem and /proc/pid/maps to read memory out of a running process on Linux.

Usage

Basic usage looks like:

// Request access to PID `1234`'s memory
let mem = Memory::pid(1234)?;

/// Read some data!
let data = mem.read::<u32>(0x13370000)?;

/// Read a slice of 69 floats
let data = mem.read_slice::<f32>(0x13370000, 69)?;

lib.rs:

A memory reading library for reading data from /proc/<pid>/mem with memory layout awareness from /proc/<pid>/maps

No runtime deps