MCPcopy Create free account
hub / github.com/apache/arrow / TestAlignment

Method TestAlignment

cpp/src/arrow/memory_pool_test.h:93–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 }
92
93 void TestAlignment() {
94 auto pool = memory_pool();
95 {
96 uint8_t* data64;
97 ASSERT_OK(pool->Allocate(10, &data64));
98 ASSERT_EQ(reinterpret_cast<uintptr_t>(data64) % kDefaultBufferAlignment, 0);
99 pool->Free(data64, 10);
100 }
101
102 {
103 uint8_t* data512;
104 ASSERT_OK(pool->Allocate(10, 512, &data512));
105 ASSERT_EQ(reinterpret_cast<uintptr_t>(data512) % 512, 0);
106 pool->Free(data512, 10, 512);
107 }
108 }
109};
110
111} // namespace arrow

Callers 2

TYPED_TEST_PFunction · 0.80
TEST_FFunction · 0.80

Calls 3

memory_poolFunction · 0.50
AllocateMethod · 0.45
FreeMethod · 0.45

Tested by

no test coverage detected