diff options
author | asorotsky <asorotsky@yandex-team.ru> | 2022-02-10 16:47:33 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:33 +0300 |
commit | 80f0a6b4102e3b2c89f23935c7690409033ea24c (patch) | |
tree | d37ae19cf2360516f71e010c02f3fd8fc6b22999 /library/cpp/lfalloc/alloc_profiler | |
parent | 9f1d4466bb653173233b0e47d2cbda7f46995f92 (diff) | |
download | ydb-80f0a6b4102e3b2c89f23935c7690409033ea24c.tar.gz |
Restoring authorship annotation for <asorotsky@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/lfalloc/alloc_profiler')
-rw-r--r-- | library/cpp/lfalloc/alloc_profiler/align_ut.cpp | 46 | ||||
-rw-r--r-- | library/cpp/lfalloc/alloc_profiler/profiler.cpp | 2 | ||||
-rw-r--r-- | library/cpp/lfalloc/alloc_profiler/stackcollect.cpp | 2 | ||||
-rw-r--r-- | library/cpp/lfalloc/alloc_profiler/ut/ya.make | 2 |
4 files changed, 26 insertions, 26 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"); + } + } + } +} diff --git a/library/cpp/lfalloc/alloc_profiler/profiler.cpp b/library/cpp/lfalloc/alloc_profiler/profiler.cpp index 0e30927a5a..b4f92fe0db 100644 --- a/library/cpp/lfalloc/alloc_profiler/profiler.cpp +++ b/library/cpp/lfalloc/alloc_profiler/profiler.cpp @@ -1,5 +1,5 @@ #include "profiler.h" - + #include "stackcollect.h" #include <util/generic/algorithm.h> diff --git a/library/cpp/lfalloc/alloc_profiler/stackcollect.cpp b/library/cpp/lfalloc/alloc_profiler/stackcollect.cpp index fded4e2fd1..643fd1ccda 100644 --- a/library/cpp/lfalloc/alloc_profiler/stackcollect.cpp +++ b/library/cpp/lfalloc/alloc_profiler/stackcollect.cpp @@ -1,5 +1,5 @@ #include "stackcollect.h" - + #include "profiler.h" #include <util/generic/algorithm.h> diff --git a/library/cpp/lfalloc/alloc_profiler/ut/ya.make b/library/cpp/lfalloc/alloc_profiler/ut/ya.make index 8a7daa74af..9b93752823 100644 --- a/library/cpp/lfalloc/alloc_profiler/ut/ya.make +++ b/library/cpp/lfalloc/alloc_profiler/ut/ya.make @@ -16,7 +16,7 @@ ENDIF() SRCS( profiler_ut.cpp - align_ut.cpp + align_ut.cpp ) END() |