Crates.io | warlock |
lib.rs | warlock |
version | 0.0.4 |
source | src |
created_at | 2021-04-26 14:52:27.247651 |
updated_at | 2021-04-26 20:03:59.876115 |
description | Arena allocation optimized collections |
homepage | |
repository | |
max_upload_size | |
id | 389727 |
size | 14,543 |
A collection of data structures optimized for use alongside an arena allocator.
Warlock provides some collections typically provided by std
which are
optimized for use alongside an arena allocator. That is, these collections
DO NOT free their own memory. The memory they allocate is expected to be
cleaned up by the allocator itself. However, when the collections contain
items that `impl Drop`, the collections will drop any items they contain
properly.
These collections also differ slightly from the standard collections in that they assume that memory allocations can fail, and will return `Result`s for any operation that allocates memory.
Warlock also provides a very, very, very simple bump allocator, which may be used alongside these data structures.
As close to std
as possible
Compile on Rust stable (see 1.5 for more information)
Be a 100% drop-in replacement for std
containers
You want collections that behave correctly w/r/t memory allocation under any circumstance.
You want a 100% stable crate. This crate is under heavy development
As of this writing, there is currently an ongoing effort to add a standard
Allocator
trait/concept to std
. It is partially complete, however, I
expect that it will be quite a while before it lands in stable. In the
meantime, this crate provides an Allocator
trait which is designed to be
as close as possible to the proposed standard. Once the standard Allocator
trait is merged, this will be dropped.
In the future, this crate will provide an optional feature which will
add a blanket implementation of the std
Allocator
trait for
warlock::Allocator
.