aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/lfalloc/alloc_profiler/align_ut.cpp
diff options
context:
space:
mode:
authorasorotsky <asorotsky@yandex-team.ru>2022-02-10 16:47:33 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:33 +0300
commit80f0a6b4102e3b2c89f23935c7690409033ea24c (patch)
treed37ae19cf2360516f71e010c02f3fd8fc6b22999 /library/cpp/lfalloc/alloc_profiler/align_ut.cpp
parent9f1d4466bb653173233b0e47d2cbda7f46995f92 (diff)
downloadydb-80f0a6b4102e3b2c89f23935c7690409033ea24c.tar.gz
Restoring authorship annotation for <asorotsky@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/lfalloc/alloc_profiler/align_ut.cpp')
-rw-r--r--library/cpp/lfalloc/alloc_profiler/align_ut.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/lfalloc/alloc_profiler/align_ut.cpp b/library/cpp/lfalloc/alloc_profiler/align_ut.cpp
index db9b17b95b..1b62fe73b7 100644
--- a/library/cpp/lfalloc/alloc_profiler/align_ut.cpp
+++ b/library/cpp/lfalloc/alloc_profiler/align_ut.cpp
@@ -1,23 +1,23 @@
-#include <library/cpp/testing/unittest/registar.h>
-
-#include <util/generic/scope.h>
-
-Y_UNIT_TEST_SUITE(MemAlign) {
- Y_UNIT_TEST(ShouldAlign)
- {
- for (ui64 size = 8; size <= 32 * 1024; size *= 8) {
- for (ui64 align = 8; align <= 4096; align *=2) {
- void* ptr = nullptr;
-
- int res = posix_memalign(&ptr, align, size);
- UNIT_ASSERT_C(res == 0 && ptr != nullptr, "memalign failed");
-
- Y_DEFER {
- free(ptr);
- };
-
- UNIT_ASSERT_C((uintptr_t)ptr % align == 0, "non aligned memory");
- }
- }
- }
-}
+#include <library/cpp/testing/unittest/registar.h>
+
+#include <util/generic/scope.h>
+
+Y_UNIT_TEST_SUITE(MemAlign) {
+ Y_UNIT_TEST(ShouldAlign)
+ {
+ for (ui64 size = 8; size <= 32 * 1024; size *= 8) {
+ for (ui64 align = 8; align <= 4096; align *=2) {
+ void* ptr = nullptr;
+
+ int res = posix_memalign(&ptr, align, size);
+ UNIT_ASSERT_C(res == 0 && ptr != nullptr, "memalign failed");
+
+ Y_DEFER {
+ free(ptr);
+ };
+
+ UNIT_ASSERT_C((uintptr_t)ptr % align == 0, "non aligned memory");
+ }
+ }
+ }
+}