pub struct ShufflingAllocator<A>where
A: 'static + GlobalAlloc,{ /* private fields */ }
Expand description
A shuffling allocator.
Wraps an existing allocator and shuffles the order of heap allocations yielded.
See the crate-level documentation for more details.
§Example
use shuffling_allocator::ShufflingAllocator;
use std::alloc::System;
static SHUFFLED_SYSTEM_ALLOC: ShufflingAllocator<System> = shuffling_allocator::wrap!(&System);
Trait Implementations§
Source§impl<A> GlobalAlloc for ShufflingAllocator<A>where
A: GlobalAlloc,
impl<A> GlobalAlloc for ShufflingAllocator<A>where
A: GlobalAlloc,
Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocates memory as described by the given
layout
. Read moreAuto Trait Implementations§
impl<A> !Freeze for ShufflingAllocator<A>
impl<A> RefUnwindSafe for ShufflingAllocator<A>where
A: RefUnwindSafe,
impl<A> Send for ShufflingAllocator<A>where
A: Sync,
impl<A> Sync for ShufflingAllocator<A>where
A: Sync,
impl<A> Unpin for ShufflingAllocator<A>
impl<A> !UnwindSafe for ShufflingAllocator<A>
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