bit_packed_atomic_flags implements a container for garbage collection flags that is only thread unsafe on calls to setup. This class bit-packs collection flags for memory efficiency.
Declared in <cuckoocache.h>
class bit_packed_atomic_flags;
All operations are std::memory_order_relaxed so external mechanisms must ensure that writes and reads are properly synchronized.
On setup(n), all bits up to n are marked as collected.
Under the hood, because it is an 8-bit type, it makes sense to use a multiple of 8 for setup, but it will be safe if that is not the case as well.
| Name | Description |
|---|---|
bit_packed_atomic_flags [constructor] | Constructors |
bit_is_set | bit_is_set queries the table for discardability at s. |
bit_set | bit_set sets an entry as discardable. |
bit_unset | bit_unset marks an entry as something that should not be overwritten. |
setup | setup marks all entries and ensures that bit_packed_atomic_flags can store at least b entries. |