pub type MemAllocFn<T> = Box<dyn Fn(usize) -> Mem<T>>;
Expand description

Generic memory allocator for Mem that hides concrete memory type

The intended use-case is when a callee (such as a library) must allocate memory. In this case, the caller can pass in a generic memory allocator This allows the callee to generalize over all memory types.