From 60649aa01b65ecb998d3f19c0327a5ce515455a8 Mon Sep 17 00:00:00 2001 From: peterpaule Date: Wed, 7 Oct 2020 12:33:03 -0700 Subject: [PATCH] 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 --- util/aligned_buffer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/aligned_buffer.h b/util/aligned_buffer.h index 5cd6e8f3c..7098322f8 100644 --- a/util/aligned_buffer.h +++ b/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 // helps to figuring out the right alignment. // Example: -// TruncateToPageBoundary(5000, 4096) => 4096 -// TruncateToPageBoundary(10000, 4096) => 8192 +// TruncateToPageBoundary(4096, 5000) => 4096 +// TruncateToPageBoundary((4096, 10000) => 8192 inline size_t TruncateToPageBoundary(size_t page_size, size_t s) { s -= (s & (page_size - 1)); assert((s % page_size) == 0);