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
This commit is contained in:
peterpaule 2020-10-07 12:33:03 -07:00 committed by Facebook GitHub Bot
parent a242a58301
commit 60649aa01b

View File

@ -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);