| 269 | } |
| 270 | |
| 271 | void ReservationTracker::DecreaseReservationLocked( |
| 272 | int64_t bytes, bool is_child_reservation) { |
| 273 | DCHECK(initialized_); |
| 274 | DCHECK_GE(reservation_.Load(), bytes); |
| 275 | if (bytes == 0) return; |
| 276 | if (is_child_reservation) child_reservations_.Add(-bytes); |
| 277 | UpdateReservation(-bytes); |
| 278 | ReleaseToMemTracker(bytes); |
| 279 | // The reservation should be returned up the tree. |
| 280 | if (parent_ != nullptr) parent_->DecreaseReservation(bytes, true); |
| 281 | CheckConsistency(); |
| 282 | } |
| 283 | |
| 284 | bool ReservationTracker::TransferReservationTo(ReservationTracker* other, int64_t bytes) { |
| 285 | if (other == this) return true; |
nothing calls this directly
no test coverage detected