Skip to content

Commit

Permalink
Minor comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wks committed Jan 20, 2025
1 parent 3ef3429 commit 96614f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/util/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ pub fn bytes_to_formatted_string(bytes: usize) -> String {
format!("{}{}", num, UNITS.last().unwrap())
}

/// Shift `num` by `bits` to the right. Add 1 to the result if any bits are shifted out to the
/// right. This is equivalent to dividing `num` by 2 to the power of `bits`, rounding towards
/// infinity.
/// Shift `num` by `bits` to the right. Add 1 to the result if any `1` bits are shifted out to the
/// right. This is equivalent to dividing `num` by 2 to the power of `bits`, rounding up.
///
/// This function has undefined behavior if `bits` is greater or equal to the number of bits in
/// `usize`.
Expand Down
2 changes: 1 addition & 1 deletion src/util/metadata/side_metadata/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ impl SideMetadataContext {
let mut total = 0;
for spec in self.global.iter() {
// This rounds up. No matter how small `data_pages` is, the side metadata size will be
// at least one page. This behavior is *intended*. The over-estimated amount is used
// at least one page. This behavior is *intended*. This over-estimated amount is used
// for triggering GC and resizing the heap.
total += data_to_meta_size_round_up(spec, data_pages);
}
Expand Down

0 comments on commit 96614f4

Please sign in to comment.