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

Method TChunkedOutputStream

library/cpp/yt/memory/chunked_output_stream.cpp:9–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7////////////////////////////////////////////////////////////////////////////////
8
9TChunkedOutputStream::TChunkedOutputStream(
10 TRefCountedTypeCookie tagCookie,
11 ISimpleMemoryUsageTrackerPtr memoryUsageTracker,
12 size_t initialReserveSize,
13 size_t maxReserveSize)
14 : MemoryUsageTracker_(std::move(memoryUsageTracker))
15 , CurrentChunkMemoryUsageGuard_(TSimpleMemoryUsageTrackerGuard::Build(MemoryUsageTracker_))
16 , MaxReserveSize_(RoundUpToPage(maxReserveSize))
17 , CurrentReserveSize_(RoundUpToPage(initialReserveSize))
18 , CurrentChunk_(tagCookie, /*size*/ 0)
19{
20 YT_VERIFY(MaxReserveSize_ > 0);
21
22 if (CurrentReserveSize_ > MaxReserveSize_) {
23 CurrentReserveSize_ = MaxReserveSize_;
24 }
25}
26
27std::vector<TSharedRef> TChunkedOutputStream::Finish()
28{

Callers

nothing calls this directly

Calls 2

RoundUpToPageFunction · 0.85
moveFunction · 0.50

Tested by

no test coverage detected