Crate region [−] [src]
A library for manipulating memory regions
This crate provides several functions for handling memory pages and regions. It is implemented using platform specific APIs. The library is relatively bare metal.
Not all OS specific quirks are abstracted away. For instance; some OSs enforce memory pages to be readable whilst other may prevent pages from becoming executable (i.e DEP).
Usage
This crate is on crates.io and can be
used by adding region
to your dependencies in your project's Cargo.toml
.
[dependencies]
region = "0.0.1"
and this to your crate root:
extern crate region;
Modules
Protection |
This module exists solely to wrap the protection flags in a namespace, until associated constants are in stable. |
Structs
Region |
A descriptor for a memory region |
Enums
Error |
Possible errors when altering region properties. |
Functions
lock |
Locks memory regions to RAM. |
page_size | |
protect |
Changes the memory protection of one or more regions. |
query |
Queries the OS with an address, returning the region it resides within. |
query_range |
Queries the OS with a range, returning the regions it contains. |
unlock |
Unlocks memory regions from RAM. |