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

Method SetUp

bolt/common/memory/tests/StreamArenaTest.cpp:43–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

addLeafPoolMethod · 0.80
allocatorMethod · 0.45
seedMethod · 0.45

Tested by

no test coverage detected