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.
collect/src/memfile/map.rs

31 lines
474 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)]
#[repr(i32)]
pub enum MapProtection
{
None = PROT_NONE,
Read = PROT_READ,
Write = PROT_WRITE,
Execute = PROT_EXEC,
}
impl Default for MapProtection
{
#[inline(always)]
fn default() -> Self
{
Self::None
}
}