Trait hazard::Memory [−][src]
pub trait Memory { fn allocate<T>(&self, value: T) -> *mut T; unsafe fn deallocate<T>(&self, pointer: *mut T); }
A type that can allocate and deallocate memory.
Required Methods
fn allocate<T>(&self, value: T) -> *mut T
Allocates memory.
unsafe fn deallocate<T>(&self, pointer: *mut T)
Deallocates the memory associated with the supplied pointer.
Implementors
impl Memory for BoxMemory