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

Method MakeCopy

library/cpp/yt/memory/ref.cpp:302–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302TSharedRef TSharedRef::MakeCopy(TRef ref, TRefCountedTypeCookie tagCookie)
303{
304 if (!ref) {
305 return {};
306 }
307 if (ref.Empty()) {
308 return TSharedRef::MakeEmpty();
309 }
310 auto result = TSharedMutableRef::Allocate(ref.Size(), {.InitializeStorage = false}, tagCookie);
311 ::memcpy(result.Begin(), ref.Begin(), ref.Size());
312 return result;
313}
314
315std::vector<TSharedRef> TSharedRef::Split(size_t partSize) const
316{

Callers

nothing calls this directly

Calls 7

AllocateAndAddMethod · 0.80
AllocateFunction · 0.50
EmptyMethod · 0.45
SizeMethod · 0.45
BeginMethod · 0.45
ByteSizeMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected