aren_alloc
A thread-local memory allocator backed up by the concept of object pools,
used to address the memory allocation needs of arendur
.
This crate is useful when
- you want to frequently create and destroy some objects
- these objects are copyable small ones, with size under 256 bytes
- you want the underlying memory to be reused
- you want a unified interface for the pool, rather than a typed one
Usage
use Allocator;
;
let allocator = new;
let p = allocator.alloc;
assert_eq!;
assert_eq!;
As CoerceUnsized
is supported for Pointer
, compiling would require a nightly version.
License
This project is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.