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:
parent
a242a58301
commit
60649aa01b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user