You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
390 B
23 lines
390 B
//! Memory mapping
|
|
use super::*;
|
|
use libc::{
|
|
c_int,
|
|
|
|
PROT_NONE,
|
|
PROT_READ,
|
|
PROT_WRITE,
|
|
PROT_EXEC,
|
|
};
|
|
|
|
//TODO: Make this a `bitflags` struct.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Copy, Default)]
|
|
#[repr(i32)]
|
|
pub enum MapProtection
|
|
{
|
|
#[default]
|
|
None = PROT_NONE,
|
|
Read = PROT_READ,
|
|
Write = PROT_WRITE,
|
|
Execute = PROT_EXEC,
|
|
}
|