[−][src]Trait gfx_memory::Allocator
Allocator trait implemented for various allocators.
Associated Types
Loading content...Associated Constants
Loading content...Required methods
fn alloc(
&mut self,
device: &B::Device,
size: Size,
align: Size
) -> Result<(Self::Block, Size), AllocationError>
&mut self,
device: &B::Device,
size: Size,
align: Size
) -> Result<(Self::Block, Size), 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) -> Size
Free block of memory. Returns amount of memory returned to the device.
Implementors
impl<B: Backend> Allocator<B> for DedicatedAllocator
[src]
type Block = DedicatedBlock<B>
const KIND: Kind
[src]
fn alloc(
&mut self,
device: &B::Device,
size: Size,
_align: Size
) -> Result<(DedicatedBlock<B>, Size), AllocationError>
[src]
&mut self,
device: &B::Device,
size: Size,
_align: Size
) -> Result<(DedicatedBlock<B>, Size), AllocationError>
fn free(&mut self, device: &B::Device, block: DedicatedBlock<B>) -> Size
[src]
impl<B: Backend> Allocator<B> for GeneralAllocator<B>
[src]
type Block = GeneralBlock<B>
const KIND: Kind
[src]
fn alloc(
&mut self,
device: &B::Device,
size: Size,
align: Size
) -> Result<(GeneralBlock<B>, Size), AllocationError>
[src]
&mut self,
device: &B::Device,
size: Size,
align: Size
) -> Result<(GeneralBlock<B>, Size), AllocationError>