1 unstable release

0.2.0 Aug 13, 2021

#131 in No standard library

Download history 210947/week @ 2024-07-25 217493/week @ 2024-08-01 250094/week @ 2024-08-08 251747/week @ 2024-08-15 261009/week @ 2024-08-22 223080/week @ 2024-08-29 263362/week @ 2024-09-05 268508/week @ 2024-09-12 267581/week @ 2024-09-19 302033/week @ 2024-09-26 315474/week @ 2024-10-03 300373/week @ 2024-10-10 326704/week @ 2024-10-17 344350/week @ 2024-10-24 307455/week @ 2024-10-31 316542/week @ 2024-11-07

1,360,775 downloads per month
Used in 256 crates (3 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