[][src]Struct gfx_memory::GeneralAllocator

pub struct GeneralAllocator<B: Backend> { /* fields omitted */ }

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]

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.

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

impl<B> Unpin for GeneralAllocator<B>

impl<B> UnwindSafe for GeneralAllocator<B> where
    <B as Backend>::Memory: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.