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

Method removePool

bolt/common/memory/SharedArbitrator.cpp:549–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549void SharedArbitrator::removePool(MemoryPool* pool) {
550 BOLT_CHECK_EQ(pool->reservedBytes(), 0, "{}", pool->name());
551 const uint64_t freedBytes = shrinkPool(pool, 0);
552 BOLT_CHECK_EQ(pool->capacity(), 0, "{}", pool->name());
553 freeCapacity(freedBytes);
554
555 std::unique_lock guard{participantLock_};
556 const auto ret = participants_.erase(pool->name());
557 BOLT_CHECK_EQ(ret, 1, "{}", pool->name());
558}
559
560std::vector<ArbitrationCandidate> SharedArbitrator::getCandidates(
561 bool freeCapacityOnly) {

Callers 2

addRootPoolMethod · 0.45
dropPoolMethod · 0.45

Calls 4

reservedBytesMethod · 0.45
nameMethod · 0.45
capacityMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected