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§
Sourceunsafe fn deallocate_buffer(&self, raw: RawBuffer<ALIGNMENT>)
unsafe fn deallocate_buffer(&self, raw: RawBuffer<ALIGNMENT>)
Deallocates the buffer.
§Safety
ptr
must denote a block of memory currently allocated via this allocator, andlayout
must fit that block of memory.