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

Method newWrite

bolt/common/memory/HashStringAllocator.cpp:167–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167HashStringAllocator::Position HashStringAllocator::newWrite(
168 ByteOutputStream& stream,
169 int32_t preferredSize) {
170 BOLT_CHECK(
171 !currentHeader_,
172 "Do not call newWrite before finishing the previous write to "
173 "HashStringAllocator");
174 currentHeader_ = allocate(preferredSize, false);
175
176 stream.setRange(
177 ByteRange{
178 reinterpret_cast<uint8_t*>(currentHeader_->begin()),
179 currentHeader_->size(),
180 0},
181 0);
182
183 startPosition_ = Position::atOffset(currentHeader_, 0);
184
185 return startPosition_;
186}
187
188void HashStringAllocator::extendWrite(
189 Position position,

Callers 13

storeVariableSizeAtMethod · 0.80
copySerializedRowMethod · 0.80
storeComplexTypeMethod · 0.80
appendMethod · 0.80
appendMethod · 0.80
appendMethod · 0.80
serializeMethod · 0.80
writeMethod · 0.80
writeMethod · 0.80
writeLastNullsMethod · 0.80
serializeMethod · 0.80

Calls 3

setRangeMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45

Tested by 3

serializeMethod · 0.64
TEST_FFunction · 0.64