[−][src]Trait gfx_memory::Allocator
Allocator trait implemented for various allocators.
Associated Types
Associated Constants
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.