aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-05-19 00:33:27 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-05-19 00:33:27 +0300
commit5c68fc934f34d54ff61fdbee587bf8c3ad978dcb (patch)
treee169b7ee8a7c3047f5f88dbef7342c7f019ea9ac /library/cpp/yt
parent8156a533bc4a5c6730b83d307fb7d0d9d9239b0c (diff)
downloadydb-5c68fc934f34d54ff61fdbee587bf8c3ad978dcb.tar.gz
intermediate changes
ref:f3ffb3a755c21a39bc6808f3e66c750045ea5b55
Diffstat (limited to 'library/cpp/yt')
-rw-r--r--library/cpp/yt/memory/ref.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/library/cpp/yt/memory/ref.cpp b/library/cpp/yt/memory/ref.cpp
index e8ff42e976..d9f2104090 100644
--- a/library/cpp/yt/memory/ref.cpp
+++ b/library/cpp/yt/memory/ref.cpp
@@ -4,6 +4,7 @@
#include <library/cpp/ytalloc/api/ytalloc.h>
#include <util/system/info.h>
+#include <util/system/align.h>
namespace NYT {
@@ -297,9 +298,7 @@ size_t GetPageSize()
size_t RoundUpToPage(size_t bytes)
{
- static const size_t PageSize = NSystemInfo::GetPageSize();
- YT_ASSERT((PageSize & (PageSize - 1)) == 0);
- return (bytes + PageSize - 1) & (~(PageSize - 1));
+ return AlignUp<size_t>(bytes, GetPageSize());
}
size_t GetByteSize(const TSharedRefArray& array)