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

Method Initialize

library/cpp/yt/memory/ref.cpp:119–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117#endif
118
119 void Initialize(
120 size_t size,
121 TSharedMutableRefAllocateOptions options,
122 TRefCountedTypeCookie cookie)
123 {
124 Size_ = size;
125#ifdef YT_ENABLE_REF_COUNTED_TRACKING
126 Cookie_ = cookie;
127#else
128 Y_UNUSED(cookie);
129#endif
130 if (options.InitializeStorage) {
131 ::memset(static_cast<TDerived*>(this)->GetBegin(), 0, Size_);
132 }
133#ifdef YT_ENABLE_REF_COUNTED_TRACKING
134 TRefCountedTrackerFacade::AllocateTagInstance(Cookie_);
135 TRefCountedTrackerFacade::AllocateSpace(Cookie_, Size_);
136#endif
137 }
138};
139
140////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 2

Y_UNUSEDFunction · 0.85
GetBeginMethod · 0.45

Tested by

no test coverage detected