MCPcopy Create free account
hub / github.com/catboost/catboost / TestLargeStartingAlign

Method TestLargeStartingAlign

util/memory/pool_ut.cpp:217–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215 }
216
217 void TestLargeStartingAlign() {
218 TMemoryPool pool(1);
219
220 void* aligned4k1 = pool.Allocate(1, 4096);
221 void* aligned4k2 = pool.Allocate(1, 4096);
222 UNIT_ASSERT_VALUES_UNEQUAL(aligned4k1, nullptr);
223 UNIT_ASSERT_VALUES_UNEQUAL(aligned4k2, nullptr);
224 UNIT_ASSERT_VALUES_EQUAL(reinterpret_cast<uintptr_t>(aligned4k1) & 4095, 0);
225 UNIT_ASSERT_VALUES_EQUAL(reinterpret_cast<uintptr_t>(aligned4k2) & 4095, 0);
226 }
227
228 template <typename T>
229 void CheckMoveAlloc() {

Callers

nothing calls this directly

Calls 1

AllocateMethod · 0.45

Tested by

no test coverage detected