[−][src]Trait rendy::memory::Allocator
Allocator trait implemented for various allocators.
Associated Types
Loading content...Required methods
fn kind() -> Kind
Get allocator kind.
fn alloc(
&mut self,
device: &<B as Backend>::Device,
size: u64,
align: u64
) -> Result<(Self::Block, u64), AllocationError>
&mut self,
device: &<B as Backend>::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 as Backend>::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,
type Block = DedicatedBlock<B>
fn kind() -> Kind
[src]
fn alloc(
&mut self,
device: &<B as Backend>::Device,
size: u64,
_align: u64
) -> Result<(DedicatedBlock<B>, u64), AllocationError>
[src]
&mut self,
device: &<B as Backend>::Device,
size: u64,
_align: u64
) -> Result<(DedicatedBlock<B>, u64), AllocationError>
fn free(
&mut self,
device: &<B as Backend>::Device,
block: DedicatedBlock<B>
) -> u64
[src]
&mut self,
device: &<B as Backend>::Device,
block: DedicatedBlock<B>
) -> u64
impl<B> Allocator<B> for DynamicAllocator<B> where
B: Backend,
[src]
B: Backend,
type Block = DynamicBlock<B>
fn kind() -> Kind
[src]
fn alloc(
&mut self,
device: &<B as Backend>::Device,
size: u64,
align: u64
) -> Result<(DynamicBlock<B>, u64), AllocationError>
[src]
&mut self,
device: &<B as Backend>::Device,
size: u64,
align: u64
) -> Result<(DynamicBlock<B>, u64), AllocationError>
fn free(
&mut self,
device: &<B as Backend>::Device,
block: DynamicBlock<B>
) -> u64
[src]
&mut self,
device: &<B as Backend>::Device,
block: DynamicBlock<B>
) -> u64
impl<B> Allocator<B> for LinearAllocator<B> where
B: Backend,
[src]
B: Backend,