Skip to content

Commit

Permalink
align nodes to 512 bits
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Sep 1, 2023
1 parent f04109c commit be269d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ pub fn is_lock_free() -> bool {
AtomicKey::is_lock_free()
}

/* Align to 512 to decrease false sharing. */
#[repr(C, align(512))]
struct Node<T> {
pub value: mem::ManuallyDrop<T>,
pub next: *mut Node<T>,
Expand Down

0 comments on commit be269d8

Please sign in to comment.