Struct ccthw_ash_allocator::SizedAllocator
source · pub struct SizedAllocator<SmallAllocator: ComposableAllocator, LargeAllocator: ComposableAllocator> { /* private fields */ }
Expand description
An allocator which composes over two other allocators. When a request is below the trigger size, it is sent to the first alloctor, otherwise it is sent to the second allocator.
Implementations§
source§impl<S, L> SizedAllocator<S, L>where
S: ComposableAllocator,
L: ComposableAllocator,
impl<S, L> SizedAllocator<S, L>where S: ComposableAllocator, L: ComposableAllocator,
Trait Implementations§
source§impl<S, L> ComposableAllocator for SizedAllocator<S, L>where
S: ComposableAllocator,
L: ComposableAllocator,
impl<S, L> ComposableAllocator for SizedAllocator<S, L>where S: ComposableAllocator, L: ComposableAllocator,
source§unsafe fn allocate(
&mut self,
allocation_requirements: AllocationRequirements
) -> Result<Allocation, AllocatorError>
unsafe fn allocate( &mut self, allocation_requirements: AllocationRequirements ) -> Result<Allocation, AllocatorError>
Allocate GPU memory based on the given requirements. Read more
source§unsafe fn free(&mut self, allocation: Allocation)
unsafe fn free(&mut self, allocation: Allocation)
Return a GPU memory allocation to the device. Read more