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

Method startWrite

bolt/common/memory/ByteStream.h:285–292  ·  view source on GitHub ↗

Prepares 'this' for writing. Can be called several times, e.g. PrestoSerializer resets these. The memory formerly backing 'ranges_' is not owned and the caller needs to recycle or free this independently.

Source from the content-addressed store, hash-verified

283 /// 'ranges_' is not owned and the caller needs to recycle or free
284 /// this independently.
285 void startWrite(int32_t initialSize) {
286 ranges_.clear();
287 isReversed_ = false;
288 allocatedBytes_ = 0;
289 current_ = nullptr;
290 lastRangeEnd_ = 0;
291 extend(initialSize);
292 }
293
294 void seek(int32_t range, int32_t position) {
295 current_ = &ranges_[range];

Callers 2

IOBufOutputStreamMethod · 0.45
TEST_FFunction · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected