1 unstable release

0.2.0 Aug 13, 2021

#129 in No standard library

Download history 105511/week @ 2023-12-04 87843/week @ 2023-12-11 80496/week @ 2023-12-18 39783/week @ 2023-12-25 72849/week @ 2024-01-01 96331/week @ 2024-01-08 100502/week @ 2024-01-15 96472/week @ 2024-01-22 100976/week @ 2024-01-29 93360/week @ 2024-02-05 94845/week @ 2024-02-12 101612/week @ 2024-02-19 121680/week @ 2024-02-26 127852/week @ 2024-03-04 121855/week @ 2024-03-11 121701/week @ 2024-03-18

496,634 downloads per month
Used in 140 crates (2 directly)

MIT/Apache

70KB
1K SLoC

tagptr

Strongly typed marked pointers for storing bit patterns (tags) alongside raw pointers for concurrent programming with atomic operations.

Build Status Latest version Documentation License

Usage

Add the following to your Cargo.toml

[dependencies]
tagptr = "0.2.0"

Motivation

Most atomic CPU instructions only work with register-sized memory words (e.g., 32-bit or 64-bit). Many low-level concurrent algorithms thus need to store aditional data (tags) in the unused lower bits of pointers to referenced data objects. This crate provides thin and efficient abstractions for working with such pointers.

License

tagptr 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.

No runtime deps