Struct libafl_bolts::shmem::unix_shmem::MmapShMem

source ·
pub struct MmapShMem { /* private fields */ }
Expand description

Mmap ShMem for Unix Mmap-based The sharedmap impl for unix using shm_open and mmap. Default on MacOS and iOS, where we need a central point to unmap shared mem segments for dubious Mach kernel reasons.

Implementations§

source§

impl MmapShMem

source

pub fn new(map_size: usize, rand_id: u32) -> Result<Self, Error>

Create a new MmapShMem

source

pub fn filename_path(&self) -> &Option<[u8; 256]>

Get filename_path

Trait Implementations§

source§

impl AsMutSlice for MmapShMem

§

type Entry = u8

Type of the entries in this mut slice
source§

fn as_mut_slice(&mut self) -> &mut [u8]

Convert to a slice
source§

impl AsSlice for MmapShMem

§

type Entry = u8

Type of the entries in this slice
source§

fn as_slice(&self) -> &[u8]

Convert to a slice
source§

impl Clone for MmapShMem

source§

fn clone(&self) -> MmapShMem

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MmapShMem

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for MmapShMem

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl ShMem for MmapShMem

source§

fn id(&self) -> ShMemId

Get the id of this shared memory mapping
source§

fn len(&self) -> usize

Get the size of this mapping
source§

fn is_empty(&self) -> bool

Check if the mapping is empty
source§

fn as_ptr_of<T: Sized>(&self) -> Option<*const T>

Convert to a ptr of a given type, checking the size. If the map is too small, returns None
source§

fn as_mut_ptr_of<T: Sized>(&mut self) -> Option<*mut T>

Convert to a mut ptr of a given type, checking the size. If the map is too small, returns None
source§

fn description(&self) -> ShMemDescription

Get the description of the shared memory mapping
source§

fn write_to_env(&self, env_name: &str) -> Result<(), Error>

Write this map’s config to env

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Tail, T> Prepend<T> for Tail

§

type PreprendResult = Tail

The Resulting TupleList, of an Prepend::prepend() call, including the prepended entry.
source§

fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)

Prepend a value to this tuple, returning a new tuple with prepended value.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.