| 151 | /// enough memory. The memory calculation includes the tuple data pool and any |
| 152 | /// auxiliary memory attached to the row batch. |
| 153 | bool ALWAYS_INLINE AtCapacity() { |
| 154 | DCHECK_LE(num_rows_, capacity_); |
| 155 | // Check AtCapacity() condition enforced in MarkNeedsDeepCopy() and |
| 156 | // MarkFlushResources(). |
| 157 | DCHECK((!needs_deep_copy_ && flush_mode_ == FlushMode::NO_FLUSH_RESOURCES) |
| 158 | || num_rows_ == capacity_); |
| 159 | int64_t mem_usage = attached_buffer_bytes_ + tuple_data_pool_.total_reserved_bytes(); |
| 160 | return num_rows_ == capacity_ || mem_usage >= AT_CAPACITY_MEM_USAGE; |
| 161 | } |
| 162 | |
| 163 | TupleRow* ALWAYS_INLINE GetRow(int row_idx) { |
| 164 | DCHECK(tuple_ptrs_ != nullptr); |