Trait BufferAllocator

Source
pub trait BufferAllocator<const ALIGNMENT: usize>: Allocator {
    // Provided method
    unsafe fn deallocate_buffer(&self, raw: RawBuffer<ALIGNMENT>) { ... }
}
Expand description

A trait for types that can allocate aligned buffers.

Provided Methods§

Source

unsafe fn deallocate_buffer(&self, raw: RawBuffer<ALIGNMENT>)

Deallocates the buffer.

§Safety
  • ptr must denote a block of memory currently allocated via this allocator, and
  • layout must fit that block of memory.

Implementors§

Source§

impl<const ALIGNMENT: usize> BufferAllocator<ALIGNMENT> for Global