region
A Rust library for dealing with memory regions.
It is implemented using platform specific APIs (e.g VirtualQuery,
VirtualLock, mprotect, mlock).
Documentation
Installation
Add this to your Cargo.toml:
[]
= "0.0.6"
and this to your crate root:
extern crate region;
Example
// Assembly (x86) for returning an integer (5)
let ret5 = ;
let mut view = new.unwrap;
view.exec_with_prot.unwrap;
// The protection flags have been restored
assert_eq!;
Platforms
This library has (so far) support for Windows, Linux & macOS.