Skip to content

Commit

Permalink
Explain STORE_BUFFER_LIMIT of 128
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeuw committed May 12, 2022
1 parent efe2237 commit d3903c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/weak_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ use crate::{

pub type AllocExtra = StoreBufferAlloc;

// Each store buffer must be bounded otherwise it will grow indefinitely.
// However, bounding the store buffer means restricting the amount of weak
// behaviours observable. The author picked 128 as a good tradeoff
// so we follow them here.
const STORE_BUFFER_LIMIT: usize = 128;

#[derive(Debug, Clone)]
Expand Down

0 comments on commit d3903c5

Please sign in to comment.