[−][src]Struct basic_allocator::allocators::GenericAllocator
A thread-safe allocator, using a spin lock around a RawAlloc.
Thread-safety is required for an allocator to be used as a global allocator, so that was easy to add with a spin lock.
Implementations
impl<G> GenericAllocator<G>
[src]
impl<G: HeapGrower + Default> GenericAllocator<G>
[src]
pub unsafe fn get_raw(&self) -> MutexGuard<RawAlloc<G>>
[src]
Get a reference to the underlying RawAlloc.
Safety
This is unsafe because it blocks allocation while the mutex guard is in place.
pub fn stats(&self) -> (Validity, Stats)
[src]
Trait Implementations
impl<G: HeapGrower + Default> Default for GenericAllocator<G>
[src]
Auto Trait Implementations
impl<G> Send for GenericAllocator<G> where
G: Send,
G: Send,
impl<G> Sync for GenericAllocator<G> where
G: Send,
G: Send,
impl<G> Unpin for GenericAllocator<G> where
G: Unpin,
G: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,