| 377 | } |
| 378 | |
| 379 | size_t BatchAllocate(size_t num, size_t bin_size, void** ret) { |
| 380 | Bin<ChunkType> *bin = nullptr; |
| 381 | { |
| 382 | mutex_lock l(mu_); |
| 383 | auto it = bins_.find(bin_size); |
| 384 | if (it == bins_.end()) { |
| 385 | bin = new Bin<ChunkType>(bin_size, page_map_); |
| 386 | bins_.emplace(bin_size, bin); |
| 387 | } else { |
| 388 | bin = it->second; |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | return bin->BatchAllocate(num, ret); |
| 393 | } |
| 394 | |
| 395 | void BatchDeallocate(size_t bin_size, std::vector<void*>& ptrs) { |
| 396 | Bin<ChunkType> *bin = nullptr; |
nothing calls this directly
no test coverage detected