1 unstable release

0.2.0 Aug 13, 2021

#125 in No standard library

Download history 172696/week @ 2024-06-17 179537/week @ 2024-06-24 171898/week @ 2024-07-01 224846/week @ 2024-07-08 204212/week @ 2024-07-15 216241/week @ 2024-07-22 221181/week @ 2024-07-29 204125/week @ 2024-08-05 261923/week @ 2024-08-12 274984/week @ 2024-08-19 244706/week @ 2024-08-26 229298/week @ 2024-09-02 278421/week @ 2024-09-09 244406/week @ 2024-09-16 290080/week @ 2024-09-23 291357/week @ 2024-09-30

1,111,637 downloads per month
Used in 233 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