Struct divans::alloc_util::RepurposingAlloc [−][src]
pub struct RepurposingAlloc<T, AllocT: Allocator<T>> { /* fields omitted */ }
This struct can be configured in a mode where a single allocation is reused for ever larger allocations
Methods
impl<T, AllocT: Allocator<T>> RepurposingAlloc<T, AllocT>
[src]
impl<T, AllocT: Allocator<T>> RepurposingAlloc<T, AllocT>
pub fn new(alloc: AllocT) -> Self
[src]
pub fn new(alloc: AllocT) -> Self
pub fn disassemble(self) -> (AllocT, AllocT::AllocatedMemory)
[src]
pub fn disassemble(self) -> (AllocT, AllocT::AllocatedMemory)
pub fn reassemble(data: (AllocT, AllocT::AllocatedMemory)) -> Self
[src]
pub fn reassemble(data: (AllocT, AllocT::AllocatedMemory)) -> Self
pub fn use_cached_allocation<'a, ClearCacheDecision: ShouldClearCacheOnAlloc<T>>(
&'a mut self
) -> CachedAllocator<'a, T, AllocT, ClearCacheDecision>
[src]
pub fn use_cached_allocation<'a, ClearCacheDecision: ShouldClearCacheOnAlloc<T>>(
&'a mut self
) -> CachedAllocator<'a, T, AllocT, ClearCacheDecision>
ⓘImportant traits for &'a mut Ipub fn get_base_alloc(&mut self) -> &mut AllocT
[src]
ⓘImportant traits for &'a mut I
pub fn get_base_alloc(&mut self) -> &mut AllocT
pub fn free_ref(&mut self)
[src]
pub fn free_ref(&mut self)
pub fn free(self) -> AllocT
[src]
pub fn free(self) -> AllocT
Trait Implementations
impl<T, AllocT: Allocator<T>> Allocator<T> for RepurposingAlloc<T, AllocT>
[src]
impl<T, AllocT: Allocator<T>> Allocator<T> for RepurposingAlloc<T, AllocT>
type AllocatedMemory = AllocT::AllocatedMemory
fn alloc_cell(&mut self, size: usize) -> Self::AllocatedMemory
[src]
fn alloc_cell(&mut self, size: usize) -> Self::AllocatedMemory
fn free_cell(&mut self, bv: Self::AllocatedMemory)
[src]
fn free_cell(&mut self, bv: Self::AllocatedMemory)
Auto Trait Implementations
impl<T, AllocT> Send for RepurposingAlloc<T, AllocT> where
AllocT: Send,
<AllocT as Allocator<T>>::AllocatedMemory: Send,
impl<T, AllocT> Send for RepurposingAlloc<T, AllocT> where
AllocT: Send,
<AllocT as Allocator<T>>::AllocatedMemory: Send,
impl<T, AllocT> Sync for RepurposingAlloc<T, AllocT> where
AllocT: Sync,
<AllocT as Allocator<T>>::AllocatedMemory: Sync,
impl<T, AllocT> Sync for RepurposingAlloc<T, AllocT> where
AllocT: Sync,
<AllocT as Allocator<T>>::AllocatedMemory: Sync,