| 224 | } |
| 225 | |
| 226 | bool MemoryPoolManager::growPool(PoolId pid, size_t bytes) { |
| 227 | auto& pool = getPoolById(pid); |
| 228 | |
| 229 | std::unique_lock l(lock_); |
| 230 | const auto remaining = getRemainingSizeLocked(); |
| 231 | if (remaining < bytes) { |
| 232 | return false; |
| 233 | } |
| 234 | |
| 235 | pool.resize(pool.getPoolSize() + bytes); |
| 236 | return true; |
| 237 | } |
| 238 | |
| 239 | std::set<PoolId> MemoryPoolManager::getPoolsOverLimit() const { |
| 240 | std::set<PoolId> res; |