#reclamation #memory #lock-free #dynamic #concurrency

no-std reclaim

trait-based abstract interface for memory reclamation

4 releases

0.2.2 Jul 16, 2019
0.2.1 Jul 5, 2019
0.2.0 Jul 5, 2019
0.1.0 Jun 13, 2019

#400 in Memory management

42 downloads per month
Used in 2 crates

MIT/Apache

180KB
2.5K SLoC

Reclaim - Concurrent memory reclamation

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.

Build Status Latest version Documentation License Rust 1.36+

Usage

Add the following to your Cargo.toml

[dependencies]
reclaim = "0.2.0"

Minimum Supported Rust Version (MSRV)

The minimum supported rust version for this crate is 1.36.0.

Features

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.

Reclamation Scheme Implementations

The following list contains the currently available reclamation scheme implementations based on this crate's API and interface:

Down the Road

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.

License

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.

Dependencies

~195KB