pub unsafe trait MemoryAllocator: DeviceOwned {
    fn find_memory_type_index(
        &self,
        memory_type_bits: u32,
        filter: MemoryTypeFilter
    ) -> Option<u32>; fn allocate_from_type(
        &self,
        memory_type_index: u32,
        create_info: SuballocationCreateInfo
    ) -> Result<MemoryAlloc, AllocationCreationError>; fn allocate(
        &self,
        create_info: AllocationCreateInfo<'_>
    ) -> Result<MemoryAlloc, AllocationCreationError>; }
Expand description

General-purpose memory allocators which allocate from any memory type dynamically as needed.

Required Methods

Finds the most suitable memory type index in memory_type_bits using a filter. Returns None if the requirements are too strict and no memory type is able to satisfy them.

Allocates memory from a specific memory type.

Allocates memory according to requirements.

Implementations on Foreign Types

Implementors