Crates.io | reclaim |
lib.rs | reclaim |
version | 0.2.2 |
source | src |
created_at | 2019-06-13 19:44:09.903097 |
updated_at | 2019-07-16 19:52:40.074205 |
description | trait-based abstract interface for memory reclamation |
homepage | |
repository | https://github.com/oliver-giersch/reclaim.git |
max_upload_size | |
id | 140917 |
size | 186,694 |
A unified abstract interface for concurrent memory reclamation that leverages Rust's type system in order to expose a public API that is largely safe.
Add the following to your Cargo.toml
[dependencies]
reclaim = "0.2.0"
The minimum supported rust version for this crate is 1.36.0.
This crate is no_std
+ alloc
compatible. The std
feature (enabled by
default) must be disabled when this crate is intended for use in a #[no_std]
environment.
The following list contains the currently available reclamation scheme implementations based on this crate's API and interface:
The ultimate goal of this crate is to allow fully generic memory reclamation
based only on the traits Reclaim
/LocalReclaim
and Protect
.
This will allow writers of lock-free data structures to parametrize their code
over the reclamation scheme they use, making it easily exchangeable.
This is currently not possible due to the lack of GAT (generic associated
types).
Likewise, since const generics
are currently not available in stable Rust, the
crate's type safe pointer tagging mechanism has to rely on the typenum
crate.
This is also bound change in the future.
In some cases, the implementation for Record
has to rely on the memoffset
crate and its offset_of!
macro, which exhibits UB.
Once a fully sound alternative becomes available, it will be adapted.
Note, that the macro is only used for record types with an non-zero size header.
Reclaim is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.