MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / memalign

Method memalign

deps/memkind/src/test/bat_tests.cpp:167–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165 }
166
167 void memalign(size_t alignment, size_t size)
168 {
169 void *ptr = NULL;
170 int ret = allocator->memalign(&ptr, alignment, size);
171 ASSERT_EQ(0, ret) << "posix_memalign() != 0";
172 ASSERT_TRUE(ptr != NULL) << "posix_memalign() returns NULL pointer";
173 void *memset_ret = memset(ptr, 3, size);
174 ASSERT_TRUE(memset_ret != NULL);
175 record_page_association(ptr, size);
176 check_policy_and_numa_node(ptr, size);
177 allocator->free(ptr);
178 }
179
180 void free(size_t size)
181 {

Callers 2

test_memalignFunction · 0.45
TEST_PFunction · 0.45

Calls 2

record_page_associationFunction · 0.85
freeMethod · 0.45

Tested by

no test coverage detected