Fix wrong comments about function TruncateToPageBoundary. (#6975)

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/6975

Reviewed By: ajkr

Differential Revision: D22914797

Pulled By: riversand963

fbshipit-source-id: 5be2cd322d41447f638dba1336e96dcdc090f9dd
main
peterpaule 4 years ago committed by Facebook GitHub Bot
parent a242a58301
commit 60649aa01b
  1. 4
      util/aligned_buffer.h

@ -18,8 +18,8 @@ namespace ROCKSDB_NAMESPACE {
// Truncate to a multiple of page_size, which is also a page boundary. This // Truncate to a multiple of page_size, which is also a page boundary. This
// helps to figuring out the right alignment. // helps to figuring out the right alignment.
// Example: // Example:
// TruncateToPageBoundary(5000, 4096) => 4096 // TruncateToPageBoundary(4096, 5000) => 4096
// TruncateToPageBoundary(10000, 4096) => 8192 // TruncateToPageBoundary((4096, 10000) => 8192
inline size_t TruncateToPageBoundary(size_t page_size, size_t s) { inline size_t TruncateToPageBoundary(size_t page_size, size_t s) {
s -= (s & (page_size - 1)); s -= (s & (page_size - 1));
assert((s % page_size) == 0); assert((s % page_size) == 0);

Loading…
Cancel
Save