#pointer #tagging #concurrency

no-std tagptr

Strongly typed atomic and non-atomic tagged pointers

1 unstable release

0.2.0 Aug 13, 2021

#11 in #tagging

Download history 20451/week @ 2022-12-04 17730/week @ 2022-12-11 14569/week @ 2022-12-18 11012/week @ 2022-12-25 16759/week @ 2023-01-01 23334/week @ 2023-01-08 23496/week @ 2023-01-15 21877/week @ 2023-01-22 28956/week @ 2023-01-29 29278/week @ 2023-02-05 30764/week @ 2023-02-12 31010/week @ 2023-02-19 25364/week @ 2023-02-26 29717/week @ 2023-03-05 27822/week @ 2023-03-12 28586/week @ 2023-03-19

112,768 downloads per month
Used in 62 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