Struct libafl::bolts::shmem::unix_shmem::MmapShMemProvider
source · [−]pub struct MmapShMemProvider { /* private fields */ }
Expand description
A ShMemProvider
which uses shmget
/shmat
/shmctl
to provide shared memory mappings.
Trait Implementations
sourceimpl Clone for MmapShMemProvider
impl Clone for MmapShMemProvider
sourcefn clone(&self) -> MmapShMemProvider
fn clone(&self) -> MmapShMemProvider
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MmapShMemProvider
impl Debug for MmapShMemProvider
sourceimpl Default for MmapShMemProvider
impl Default for MmapShMemProvider
sourceimpl ShMemProvider for MmapShMemProvider
impl ShMemProvider for MmapShMemProvider
Implement ShMemProvider
for MmapShMemProvider
.
type ShMem = MmapShMem
type ShMem = MmapShMem
The actual shared map handed out by this ShMemProvider
.
sourcefn new_shmem(&mut self, map_size: usize) -> Result<Self::ShMem, Error>
fn new_shmem(&mut self, map_size: usize) -> Result<Self::ShMem, Error>
Create a new shared memory mapping
sourcefn shmem_from_id_and_size(
&mut self,
id: ShMemId,
size: usize
) -> Result<Self::ShMem, Error>
fn shmem_from_id_and_size(
&mut self,
id: ShMemId,
size: usize
) -> Result<Self::ShMem, Error>
Get a mapping given its id and size
sourcefn new_shmem_object<T: Sized + 'static>(&mut self) -> Result<Self::ShMem, Error>
fn new_shmem_object<T: Sized + 'static>(&mut self) -> Result<Self::ShMem, Error>
Create a new shared memory mapping to hold an object of the given type
sourcefn shmem_object_from_id<T: Sized + 'static>(
&mut self,
id: ShMemId
) -> Result<Self::ShMem, Error>
fn shmem_object_from_id<T: Sized + 'static>(
&mut self,
id: ShMemId
) -> Result<Self::ShMem, Error>
Get a mapping given its id to hold an object of the given type
sourcefn shmem_from_description(
&mut self,
description: ShMemDescription
) -> Result<Self::ShMem, Error>
fn shmem_from_description(
&mut self,
description: ShMemDescription
) -> Result<Self::ShMem, Error>
Get a mapping given a description
sourcefn clone_ref(&mut self, mapping: &Self::ShMem) -> Result<Self::ShMem, Error>
fn clone_ref(&mut self, mapping: &Self::ShMem) -> Result<Self::ShMem, Error>
Create a new sharedmap reference from an existing id
and len
sourcefn existing_from_env(&mut self, env_name: &str) -> Result<Self::ShMem, Error>
fn existing_from_env(&mut self, env_name: &str) -> Result<Self::ShMem, Error>
Reads an existing map config from env vars, then maps it
sourcefn pre_fork(&mut self) -> Result<(), Error>
fn pre_fork(&mut self) -> Result<(), Error>
This method should be called before a fork or a thread creation event, allowing the ShMemProvider
to
get ready for a potential reset of thread specific info, and for potential reconnects.
Make sure to call Self::post_fork()
after threading! Read more
sourcefn post_fork(&mut self, _is_child: bool) -> Result<(), Error>
fn post_fork(&mut self, _is_child: bool) -> Result<(), Error>
This method should be called after a fork or after cloning/a thread creation event, allowing the ShMemProvider
to
reset thread specific info, and potentially reconnect.
Make sure to call Self::pre_fork()
before threading! Read more
sourcefn release_shmem(&mut self, _shmem: &mut Self::ShMem)
fn release_shmem(&mut self, _shmem: &mut Self::ShMem)
Release the resources associated with the given ShMem
impl Send for MmapShMemProvider
Auto Trait Implementations
impl RefUnwindSafe for MmapShMemProvider
impl Sync for MmapShMemProvider
impl Unpin for MmapShMemProvider
impl UnwindSafe for MmapShMemProvider
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
type PreprendResult = Tail
type PreprendResult = Tail
The Resulting TupleList
, of an Prepend::prepend()
call,
including the prepended entry. Read more
sourcefn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.