MCPcopy Create free account
hub / github.com/catboost/catboost / Append

Method Append

util/generic/buffer.cpp:47–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void TBuffer::Append(const char* buf, size_t len) {
48 if (len > Avail()) {
49 Reserve(Pos_ + len);
50 }
51
52 Y_ASSERT(len <= Avail());
53
54 MemCopy(Data() + Pos_, buf, len);
55 NSan::Unpoison(Data() + Pos_, len);
56 Pos_ += len;
57
58 Y_ASSERT(Pos_ <= Len_);
59}
60
61void TBuffer::Fill(char ch, size_t len) {
62 if (len > Avail()) {

Callers 2

Y_UNIT_TESTFunction · 0.45
TestAppendFunction · 0.45

Calls 4

ReserveFunction · 0.85
MemCopyFunction · 0.85
UnpoisonFunction · 0.85
DataClass · 0.70

Tested by 1

TestAppendFunction · 0.36