| 128 | } |
| 129 | |
| 130 | bool MemoryPoolManager::provisionPool( |
| 131 | PoolId pid, const std::vector<uint32_t>& slabsDistribution) { |
| 132 | if (pid >= static_cast<PoolId>(pools_.size())) { |
| 133 | throw std::invalid_argument(fmt::format("Invalid pool id {}", pid)); |
| 134 | } |
| 135 | return pools_[pid]->provision(slabsDistribution); |
| 136 | } |
| 137 | |
| 138 | MemoryPool& MemoryPoolManager::getPoolByName(std::string_view name) const { |
| 139 | std::shared_lock l(lock_); |