MCPcopy Create free account
hub / github.com/bytedance/bolt / sizeIncrement

Method sizeIncrement

bolt/exec/RowContainer.cpp:1137–1148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1135 BOLT_CHECK_GT(
1136 rowSize, 0, "Estimated row size of the RowContainer must be positive.");
1137 return rowSize;
1138}
1139
1140int64_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}

Callers 8

ensureInputFitsMethod · 0.80
ensureInputFitsMethod · 0.80
ensureInputFitsMethod · 0.80
ensureInputFitsMethod · 0.80
ensureInputFitsMethod · 0.80
ensureInputFitsMethod · 0.80
reserveMemoryMethod · 0.80
ensureInputFitsMethod · 0.80

Calls 2

roundUpFunction · 0.85
freeSpaceMethod · 0.45

Tested by

no test coverage detected