25 using namespace folly;
59 template <
typename Allocator>
61 using ptr_type = std::unique_ptr<Foo, allocator_delete<Allocator>>;
69 auto p = folly::allocate_unique<Foo>(allocator,
counter);
75 p = folly::allocate_unique<Foo>(allocator,
counter);
84 auto p = folly::allocate_unique<Foo>(allocator,
counter);
99 TEST(ArenaSmartPtr, unique_ptr_SysArena) {
105 template <
typename Allocator>
107 typedef std::shared_ptr<Foo> ptr_type;
117 auto p = std::allocate_shared<Foo>(allocator,
counter);
125 p = std::allocate_shared<Foo>(allocator,
counter);
160 TEST(ArenaSmartPtr, shared_ptr_SysArena) {
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
#define EXPECT_EQ(val1, val2)
constexpr detail::Map< Move > move
global_counter & counter_
—— Concurrent Priority Queue Implementation ——
int main(int argc, char *argv[])
Foo(global_counter &counter)
void shared_ptr_test(Allocator &allocator)
void unique_ptr_test(Allocator &allocator)
std::atomic< int > counter
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
folly::detail::CompressionCounter * counter_
TEST(SequencedExecutor, CPUThreadPoolExecutor)
#define EXPECT_GT(val1, val2)