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

Function TEST

cpp/src/arrow/memory_pool_test.cc:97–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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