Skip to main content

DmaAllocator

Trait DmaAllocator 

Source
pub trait DmaAllocator {
    // Required methods
    fn alloc_dma(&self, size: usize) -> Result<DmaRegion, DmaAllocError>;
    unsafe fn free_dma(&self, region: DmaRegion);
}

Required Methods§

Source

fn alloc_dma(&self, size: usize) -> Result<DmaRegion, DmaAllocError>

Allocates dma.

Source

unsafe fn free_dma(&self, region: DmaRegion)

§Safety

The caller must ensure that region was previously allocated by this allocator and has not already been freed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§