| 485 | } |
| 486 | |
| 487 | int64_t BufferPool::BufferAllocator::FreeToSystem(vector<BufferHandle>&& buffers) { |
| 488 | int64_t bytes_freed = 0; |
| 489 | for (BufferHandle& buffer : buffers) { |
| 490 | bytes_freed += buffer.len(); |
| 491 | // Ensure that the memory is unpoisoned when it's next allocated by the system. |
| 492 | buffer.Unpoison(); |
| 493 | system_allocator_->Free(move(buffer)); |
| 494 | } |
| 495 | return bytes_freed; |
| 496 | } |
| 497 | |
| 498 | int64_t BufferPool::BufferAllocator::SumOverArenas( |
| 499 | const std::function<int64_t(FreeBufferArena* arena)>& compute_fn) const { |
no test coverage detected