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

Function TEST

cpp/src/arrow/memory_pool_test.cc:94–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92#endif
93
94TEST(DefaultMemoryPool, Identity) {
95 // The default memory pool is pointer-identical to one of the backend-specific pools.
96 MemoryPool* pool = default_memory_pool();
97 std::vector<MemoryPool*> specific_pools = {system_memory_pool()};
98#ifdef ARROW_JEMALLOC
99 specific_pools.push_back(nullptr);
100 ASSERT_OK(jemalloc_memory_pool(&specific_pools.back()));
101#endif
102#ifdef ARROW_MIMALLOC
103 specific_pools.push_back(nullptr);
104 ASSERT_OK(mimalloc_memory_pool(&specific_pools.back()));
105#endif
106 ASSERT_NE(std::find(specific_pools.begin(), specific_pools.end(), pool),
107 specific_pools.end());
108}
109
110TEST(DefaultMemoryPoolDeathTest, Statistics) {
111 MemoryPool* pool = default_memory_pool();

Callers

nothing calls this directly

Calls 15

default_memory_poolFunction · 0.85
system_memory_poolFunction · 0.85
jemalloc_memory_poolFunction · 0.85
mimalloc_memory_poolFunction · 0.85
push_backMethod · 0.80
backMethod · 0.80
jemalloc_set_decay_msFunction · 0.70
ASSERT_OK_AND_ASSIGNFunction · 0.70
jemalloc_get_statFunction · 0.70
jemalloc_peak_resetFunction · 0.70
jemalloc_stats_printFunction · 0.70
beginMethod · 0.45

Tested by

no test coverage detected