[−][src]Struct alloc_compose::SegregateAlloc
Dispatches calls to AllocRef
between two allocators depending on the size allocated.
All allocations smaller than or equal to threshold
will be dispatched to Small
. The others
will go to Large
.
Fields
small: Small
large: Large
Trait Implementations
impl<Small, Large> AllocRef for SegregateAlloc<Small, Large> where
Small: AllocRef,
Large: AllocRef,
[src]
Small: AllocRef,
Large: AllocRef,
fn alloc(self, layout: Layout, init: AllocInit) -> Result<MemoryBlock, AllocErr>
[src]
unsafe fn dealloc(self, memory: MemoryBlock)
[src]
unsafe fn grow(
self,
memory: &mut MemoryBlock,
new_size: usize,
placement: ReallocPlacement,
init: AllocInit
) -> Result<(), AllocErr>
[src]
self,
memory: &mut MemoryBlock,
new_size: usize,
placement: ReallocPlacement,
init: AllocInit
) -> Result<(), AllocErr>
unsafe fn shrink(
self,
memory: &mut MemoryBlock,
new_size: usize,
placement: ReallocPlacement
) -> Result<(), AllocErr>
[src]
self,
memory: &mut MemoryBlock,
new_size: usize,
placement: ReallocPlacement
) -> Result<(), AllocErr>
impl<Small: Clone, Large: Clone> Clone for SegregateAlloc<Small, Large>
[src]
fn clone(&self) -> SegregateAlloc<Small, Large>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Small: Copy, Large: Copy> Copy for SegregateAlloc<Small, Large>
[src]
impl<Small: Debug, Large: Debug> Debug for SegregateAlloc<Small, Large>
[src]
impl<Small, Large> Owns for SegregateAlloc<Small, Large> where
Small: Owns,
Large: Owns,
[src]
Small: Owns,
Large: Owns,
fn owns(&self, memory: &MemoryBlock) -> bool
[src]
Auto Trait Implementations
impl<Small, Large> Send for SegregateAlloc<Small, Large> where
Large: Send,
Small: Send,
Large: Send,
Small: Send,
impl<Small, Large> Sync for SegregateAlloc<Small, Large> where
Large: Sync,
Small: Sync,
Large: Sync,
Small: Sync,
impl<Small, Large> Unpin for SegregateAlloc<Small, Large> where
Large: Unpin,
Small: Unpin,
Large: Unpin,
Small: 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,