| 1135 | BOLT_CHECK_GT( |
| 1136 | rowSize, 0, "Estimated row size of the RowContainer must be positive."); |
| 1137 | return rowSize; |
| 1138 | } |
| 1139 | |
| 1140 | int64_t RowContainer::sizeIncrement( |
| 1141 | vector_size_t numRows, |
| 1142 | int64_t variableLengthBytes) const { |
| 1143 | // Small containers can grow in smaller units but for spilling the practical |
| 1144 | // minimum increment is a huge page. |
| 1145 | constexpr int32_t kAllocUnit = memory::AllocationTraits::kHugePageSize; |
| 1146 | int32_t needRows = std::max<int64_t>(0, numRows - numFreeRows_); |
| 1147 | int64_t needBytes = |
| 1148 | std::max<int64_t>(0, variableLengthBytes - stringAllocator_->freeSpace()); |
| 1149 | return bits::roundUp(needRows * fixedRowSize_, kAllocUnit) + |
| 1150 | bits::roundUp(needBytes, kAllocUnit); |
| 1151 | } |
no test coverage detected