All Projects → Tommoa → rs-process-memory

Tommoa / rs-process-memory

Licence: MIT License
A rust library that allows you to read/write into the memory of other processes

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to rs-process-memory

redis-key-dashboard
This tool allows you to do a small analysis of the amount of keys and memory you use in Redis. It allows you to see overlooked keys and notice overuse.
Stars: ✭ 42 (-33.33%)
Mutual labels:  memory, memory-management
o1heap
Constant-complexity deterministic memory allocator (heap) for hard real-time high-integrity embedded systems
Stars: ✭ 119 (+88.89%)
Mutual labels:  memory, memory-management
total
Ruby Gem to get total memory size in the system
Stars: ✭ 15 (-76.19%)
Mutual labels:  memory, memory-management
Memreduct
Lightweight real-time memory management application to monitor and clean system memory on your computer.
Stars: ✭ 1,101 (+1647.62%)
Mutual labels:  memory, memory-management
Mesh
A memory allocator that automatically reduces the memory footprint of C/C++ applications.
Stars: ✭ 1,243 (+1873.02%)
Mutual labels:  memory, memory-management
csharp-workshop
NDC London 2019, Workshop: Become a better C# programmer: more Value, more Expressions, no Waiting
Stars: ✭ 21 (-66.67%)
Mutual labels:  memory, memory-management
gctoolkit
Tool for parsing GC logs
Stars: ✭ 1,127 (+1688.89%)
Mutual labels:  memory, memory-management
bluerain
BlueRain is a fully-featured, managed memory manipulation library written in C#
Stars: ✭ 36 (-42.86%)
Mutual labels:  memory
nested
A memory efficient container for rust nested collections
Stars: ✭ 28 (-55.56%)
Mutual labels:  memory
trickster
user-friendly linux memory hacking library
Stars: ✭ 50 (-20.63%)
Mutual labels:  rust-library
python-memory-management-course
Demo code exploring Python's memory models and collection algorithms from the Talk Python Training course.
Stars: ✭ 31 (-50.79%)
Mutual labels:  memory-management
warc
⚙️ A Rust library for reading and writing WARC files
Stars: ✭ 26 (-58.73%)
Mutual labels:  rust-library
Java-Memory-Manipulation
User friendly, Garbage-free, and cross-platform process, module and memory interfacing via the power of Java
Stars: ✭ 51 (-19.05%)
Mutual labels:  memory
CPU-MEM-monitor
A simple script to log Linux CPU and memory usage (using top or pidstat command) over time and output an Excel- or OpenOfficeCalc-friendly report
Stars: ✭ 41 (-34.92%)
Mutual labels:  memory
digitalocean
A prototype API for Digital Ocean.
Stars: ✭ 35 (-44.44%)
Mutual labels:  rust-library
serial test
Allows for the creation of serialised Rust tests
Stars: ✭ 105 (+66.67%)
Mutual labels:  rust-library
maildir
A simple library to deal with maildir folders
Stars: ✭ 19 (-69.84%)
Mutual labels:  rust-library
DLL-Injector
Inject and detour DLLs and program functions both managed and unmanaged in other programs, written (almost) purely in C#. [Not maintained].
Stars: ✭ 29 (-53.97%)
Mutual labels:  memory
sensu-plugins-memory-checks
This plugin provides native memory instrumentation for monitoring and metrics collection, including: memory usage via `free` and `vmstat`, including metrics. Note that this plugin may have cross-platform issues.
Stars: ✭ 15 (-76.19%)
Mutual labels:  memory
AllYourMemoriesAreBelong2iOS
💪 Simulate iOS on-device memory warnings like a hero.
Stars: ✭ 17 (-73.02%)
Mutual labels:  memory

process-memory

Continuous Integration

This crate is loosely based on read-process-memory by luser, but has been extended to be able to write to process memory as well.

The current supported platforms are:

  • Windows
  • OSX
  • Linux

Examples

use process_memory::{Memory, DataMember, Pid, TryIntoProcessHandle};
// We have a variable with some value
let x = 4_u32;
println!("Original x-value: {}", x);

// We need to make sure that we get a handle to a process, in this case, ourselves
let handle = (std::process::id() as Pid).try_into_process_handle().unwrap();
// We make a `DataMember` that has an offset referring to its location in memory
let member = DataMember::new_offset(handle, vec![&x as *const _ as usize]);
// The memory refered to is now the same
println!("Memory location: &x: {}, member: {}", &x as *const _ as usize,
    member.get_offset().unwrap());
assert_eq!(&x as *const _ as usize, member.get_offset().unwrap());
// The value of the member is the same as the variable
println!("Member value: {}", member.read().unwrap());
assert_eq!(x, member.read().unwrap());
// We can write to and modify the value of the variable using the member
member.write(&6_u32).unwrap();
println!("New x-value: {}", x);
assert_eq!(x, 6_u32);
use process_memory::{Memory, LocalMember};
// We have a variable with some value
let x = 4_u32;
println!("Original x-value: {}", x);

// We make a `LocalMember` that has an offset referring to its location in memory
let member = LocalMember::new_offset(vec![&x as *const _ as usize]);
// The memory refered to is now the same
println!("Memory location: &x: {}, member: {}", &x as *const _ as usize,
    member.get_offset().unwrap());
assert_eq!(&x as *const _ as usize, member.get_offset().unwrap());
// The value of the member is the same as the variable
println!("Member value: {}", member.read().unwrap());
assert_eq!(x, member.read().unwrap());
// We can write to and modify the value of the variable using the member
member.write(&6_u32).unwrap();
println!("New x-value: {}", x);
assert_eq!(x, 6_u32);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].