pub struct MmapInner {
ptr: *mut c_void,
len: usize,
}
Fields§
§ptr: *mut c_void
§len: usize
Implementations§
source§impl MmapInner
impl MmapInner
sourcefn new(
len: usize,
prot: c_int,
flags: c_int,
file: RawFd,
offset: u64
) -> Result<MmapInner>
fn new( len: usize, prot: c_int, flags: c_int, file: RawFd, offset: u64 ) -> Result<MmapInner>
Creates a new MmapInner
.
This is a thin wrapper around the mmap
sytem call.
pub fn map( len: usize, file: RawFd, offset: u64, populate: bool ) -> Result<MmapInner>
pub fn map_exec( len: usize, file: RawFd, offset: u64, populate: bool ) -> Result<MmapInner>
pub fn map_mut( len: usize, file: RawFd, offset: u64, populate: bool ) -> Result<MmapInner>
pub fn map_copy( len: usize, file: RawFd, offset: u64, populate: bool ) -> Result<MmapInner>
pub fn map_copy_read_only( len: usize, file: RawFd, offset: u64, populate: bool ) -> Result<MmapInner>
sourcepub fn map_anon(len: usize, stack: bool, populate: bool) -> Result<MmapInner>
pub fn map_anon(len: usize, stack: bool, populate: bool) -> Result<MmapInner>
Open an anonymous memory map.
pub fn flush(&self, offset: usize, len: usize) -> Result<()>
pub fn flush_async(&self, offset: usize, len: usize) -> Result<()>
fn mprotect(&mut self, prot: c_int) -> Result<()>
pub fn make_read_only(&mut self) -> Result<()>
pub fn make_exec(&mut self) -> Result<()>
pub fn make_mut(&mut self) -> Result<()>
pub fn ptr(&self) -> *const u8
pub fn mut_ptr(&mut self) -> *mut u8
pub fn len(&self) -> usize
pub fn advise(&self, advice: Advice, offset: usize, len: usize) -> Result<()>
pub fn lock(&self) -> Result<()>
pub fn unlock(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more