[−][src]Struct gfx_memory::GeneralAllocator
No-fragmentation allocator. Suitable for any type of small allocations. Every freed block can be reused.
Methods
impl<B: Backend> GeneralAllocator<B>
[src]
pub fn new(
memory_type: MemoryTypeId,
memory_properties: Properties,
config: &GeneralConfig,
non_coherent_atom_size: Size
) -> Self
[src]
memory_type: MemoryTypeId,
memory_properties: Properties,
config: &GeneralConfig,
non_coherent_atom_size: Size
) -> Self
Create new GeneralAllocator
for memory_type
with memory_properties
specified,
with GeneralConfig
provided.
pub fn max_allocation(&self) -> Size
[src]
Maximum allocation size.
pub fn clear(&mut self, _device: &B::Device)
[src]
Free the contents of the allocator.
Trait Implementations
impl<B: Backend> Allocator<B> for GeneralAllocator<B>
[src]
type Block = GeneralBlock<B>
Block type returned by allocator.
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>
fn free(&mut self, device: &B::Device, block: GeneralBlock<B>) -> Size
[src]
impl<B: Debug + Backend> Debug for GeneralAllocator<B>
[src]
impl<B: Backend> Drop for GeneralAllocator<B>
[src]
impl<B: Backend> Send for GeneralAllocator<B>
[src]
impl<B: Backend> Sync for GeneralAllocator<B>
[src]
Auto Trait Implementations
impl<B> RefUnwindSafe for GeneralAllocator<B> where
<B as Backend>::Memory: RefUnwindSafe,
<B as Backend>::Memory: RefUnwindSafe,
impl<B> Unpin for GeneralAllocator<B>
impl<B> UnwindSafe for GeneralAllocator<B> where
<B as Backend>::Memory: RefUnwindSafe,
<B as Backend>::Memory: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,