| 237 | } |
| 238 | |
| 239 | std::set<PoolId> MemoryPoolManager::getPoolsOverLimit() const { |
| 240 | std::set<PoolId> res; |
| 241 | std::shared_lock l(lock_); |
| 242 | for (const auto& kv : poolsByName_) { |
| 243 | const auto poolId = kv.second; |
| 244 | const auto& pool = getPoolById(poolId); |
| 245 | if (pool.overLimit()) { |
| 246 | res.insert(poolId); |
| 247 | } |
| 248 | } |
| 249 | return res; |
| 250 | } |
| 251 | |
| 252 | // Helper routine to determine the target number of slabs to be advised in |
| 253 | // each pool. This first assigns the target based on integer division and |