[−][src]Trait rendy_memory::Allocator
Allocator trait implemented for various allocators.
Associated Types
Required methods
fn kind() -> Kind
[−]
Get allocator kind.
fn alloc(
&mut self,
device: &B::Device,
size: u64,
align: u64
) -> Result<(Self::Block, u64), AllocationError>
[−]
&mut self,
device: &B::Device,
size: u64,
align: u64
) -> Result<(Self::Block, u64), AllocationError>
Allocate block of memory. On success returns allocated block and amount of memory consumed from device.
fn free(&mut self, device: &B::Device, block: Self::Block) -> u64
[−]
Free block of memory. Returns amount of memory returned to the device.
Implementors
impl<B> Allocator<B> for DedicatedAllocator where
B: Backend,
[src][+]
B: Backend,
impl<B> Allocator<B> for DynamicAllocator<B> where
B: Backend,
[src][+]
B: Backend,
impl<B> Allocator<B> for LinearAllocator<B> where
B: Backend,
[src][+]
B: Backend,