Skip to content

Commit 56f9e75

Browse files
committed
Explain STORE_BUFFER_LIMIT of 128
1 parent 857d969 commit 56f9e75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/weak_memory.rs

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ use crate::{
6868

6969
pub type AllocExtra = StoreBufferAlloc;
7070

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

7377
#[derive(Debug, Clone)]

0 commit comments

Comments
 (0)