Skip to content

Commit

Permalink
chore: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan committed Jul 23, 2024
1 parent ea53427 commit 74cb9e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commons/zenoh-shm/src/api/provider/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl AllocAlignment {
// 1. x % A = 0 ⇔ ∀i < P, bᵢ = 0
// 2. f(x) ≜ x & !(A-1) leads to ∀i < P, bᵢ = 0, hence f(x) % A = 0
// (i.e. f zeros all bits before the P-th bit)
// 3. R = min{x | x ≥ S, x % A = 0} is equivlent to find the unique R where S ≤ R < S+A and R % A = 0
// 3. R = min{x | x ≥ S, x % A = 0} is equivalent to find the unique R where S ≤ R < S+A and R % A = 0
// 4. x-A < f(x) ≤ x ⇒ S-1 < f(S+A-1) ≤ S+A-1 ⇒ S ≤ f(S+A-1) < S+A
//
// Hence R = f(S+A-1) = (S+(A-1)) & !(A-1) is the desired value
Expand Down

0 comments on commit 74cb9e6

Please sign in to comment.