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

Method Resize

library/cpp/yt/memory/blob.cpp:81–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void TBlob::Resize(size_t newSize, bool initializeStorage)
82{
83 if (newSize > Size_) {
84 if (newSize > Capacity_) {
85 size_t newCapacity;
86 if (Capacity_ == 0) {
87 newCapacity = std::max(InitialBlobCapacity, newSize);
88 } else {
89 newCapacity = std::max(static_cast<size_t>(Capacity_ * BlobCapacityMultiplier), newSize);
90 }
91 Reallocate(newCapacity);
92 }
93 if (initializeStorage) {
94 ::memset(Begin_ + Size_, 0, newSize - Size_);
95 }
96 }
97 Size_ = newSize;
98}
99
100TBlob& TBlob::operator = (const TBlob& rhs)
101{

Callers 9

DoUnboundedNextMethod · 0.45
EncodeMethod · 0.45
DecodeMethod · 0.45
ProcessHeadersMethod · 0.45
TRandomDataHolderMethod · 0.45
DoNextMethod · 0.45
DoUndoMethod · 0.45
AdvanceMethod · 0.45
TransformMobiusFunction · 0.45

Calls 2

ReallocateFunction · 0.85
maxFunction · 0.50

Tested by

no test coverage detected