memory_ut.cpp 335 B

12345678910111213
  1. #include <library/cpp/testing/unittest/registar.h>
  2. #include "memory.h"
  3. Y_UNIT_TEST_SUITE(MallocAligned) {
  4. Y_UNIT_TEST(Test) {
  5. for (size_t size = 0; size < 1000; ++size) {
  6. void* ptr = MallocAligned(size, 128);
  7. UNIT_ASSERT(uintptr_t(ptr) % 128 == 0);
  8. FreeAligned(ptr);
  9. }
  10. }
  11. }