https://github.com/fitzgen/bacon-rajan-cc
https://github.com/fitzgen/bacon-rajan-cc
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fitzgen/bacon-rajan-cc
- Owner: fitzgen
- License: other
- Created: 2015-05-19T07:10:44.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-10-09T19:17:35.000Z (over 2 years ago)
- Last Synced: 2025-03-31T11:02:47.552Z (over 1 year ago)
- Language: Rust
- Size: 719 KB
- Stars: 93
- Watchers: 9
- Forks: 16
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# bacon_rajan_cc

[](https://crates.io/crates/bacon_rajan_cc)
[](https://docs.rs/bacon-rajan-cc)
[](https://www.rust-lang.org)
`Cc`: A reference counted type with cycle collection for Rust. Concurrent or
stop-the-world. Based on the paper
["Concurrent Cycle Collection in Reference Counted Systems"][paper] by David
F. Bacon and V.T. Rajan. [JVM implementation](https://github.com/JikesRVM/JikesRVM/blob/8f6ac1854a73059595587b63fb4e8a3553bc7ff1/rvm/src/vm/memoryManagers/concurrent/VM_Allocator.java)
Currently only stop-the-world, not concurrent.
## Usage
Add to `Cargo.toml`:
Note this requires at least Rust 1.28 for the std::alloc api's.
```toml
[dependencies]
bacon_rajan_cc = "0.3"
```
Then, in your crate:
```rust
extern crate bacon_rajan_cc;
use bacon_rajan_cc::{Cc, Trace, Tracer};
```
## Documentation
[Read the docs!][docs]
[paper]: http://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon01Concurrent.pdf
[docs]: https://docs.rs/bacon_rajan_cc/
## Future
[Incremental cycle collection](https://bugzilla.mozilla.org/show_bug.cgi?id=850065#c0)
## Alternatives
- https://github.com/jrmuizel/cc-mt (an experimental thread safe version of bacon-rajan-cc)
- https://github.com/withoutboats/shifgrethor
- https://github.com/Manishearth/rust-gc
- https://github.com/redradist/ferris-gc (a thread safe reimplementatin of rust-gc)
- https://github.com/Others/shredder
- https://github.com/jazz-lang/wafflelink (conservative on stack,precise on heap Immix Mark-Region GC with evacuation in Rust)
- https://github.com/artichoke/cactusref https://hyperbo.la/w/cactus-harvesting/