MCPcopy Create free account
hub / github.com/bytedance/bolt / SetUp

Method SetUp

bolt/common/memory/tests/ByteStreamTest.cpp:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44class ByteStreamTest : public testing::Test {
45 protected:
46 void SetUp() override {
47 constexpr uint64_t kMaxMappedMemory = 64 << 20;
48 MemoryManager::Options options;
49 options.useMmapAllocator = true;
50 options.allocatorCapacity = kMaxMappedMemory;
51 options.arbitratorCapacity = kMaxMappedMemory;
52 memoryManager_ = std::make_unique<MemoryManager>(options);
53 mmapAllocator_ = static_cast<MmapAllocator*>(memoryManager_->allocator());
54 pool_ = memoryManager_->addLeafPool("ByteStreamTest");
55 rng_.seed(124);
56 }
57
58 void TearDown() override {}
59

Callers

nothing calls this directly

Calls 3

addLeafPoolMethod · 0.80
allocatorMethod · 0.45
seedMethod · 0.45

Tested by

no test coverage detected