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

Method SetUp

bolt/common/file/tests/FileInputStreamTest.cpp:52–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 }
51
52 void SetUp() override {
53 constexpr uint64_t kMaxMappedMemory = 64 << 20;
54 MemoryManager::Options options;
55 options.useMmapAllocator = true;
56 options.allocatorCapacity = kMaxMappedMemory;
57 options.arbitratorCapacity = kMaxMappedMemory;
58 memoryManager_ = std::make_unique<MemoryManager>(options);
59 mmapAllocator_ = static_cast<MmapAllocator*>(memoryManager_->allocator());
60 pool_ = memoryManager_->addLeafPool("ByteStreamTest");
61 rng_.seed(124);
62 tempDirPath_ = exec::test::TempDirectoryPath::create();
63 fs_ = filesystems::getFileSystem(tempDirPath_->getPath(), nullptr);
64 }
65
66 void TearDown() override {}
67

Callers

nothing calls this directly

Calls 6

getFileSystemFunction · 0.85
addLeafPoolMethod · 0.80
getPathMethod · 0.80
createFunction · 0.50
allocatorMethod · 0.45
seedMethod · 0.45

Tested by

no test coverage detected