| 408 | } |
| 409 | |
| 410 | void BufferPool::SubReservation::Close() { |
| 411 | // Give any reservation back to the client. |
| 412 | if (is_closed()) return; |
| 413 | bool success = |
| 414 | tracker_->TransferReservationTo(tracker_->parent(), tracker_->GetReservation()); |
| 415 | DCHECK(success); // Transferring reservation to parent shouldn't fail. |
| 416 | tracker_->Close(); |
| 417 | tracker_.reset(); |
| 418 | } |
| 419 | |
| 420 | BufferPool::Client::Client(BufferPool* pool, TmpFileGroup* file_group, |
| 421 | const string& name, ReservationTracker* parent_reservation, MemTracker* mem_tracker, |