MCPcopy Create free account
hub / github.com/catboost/catboost / operator new

Method operator new

util/memory/addstorage.h:34–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 inline ~TAdditionalStorage() = default;
33
34 inline void* operator new(size_t len1, size_t len2) {
35 static_assert(alignof(T) >= alignof(TInfo));
36 Y_ASSERT(len1 == sizeof(T));
37 void* data = ::operator new(CombinedSizeOfInstanceWithTInfo() + len2);
38 void* info = InfoPtr(static_cast<T*>(data));
39 Y_UNUSED(new (info) TInfo(len2));
40
41 return data;
42 }
43
44 inline void operator delete(void* ptr) noexcept {
45 DoDelete(ptr);

Callers

nothing calls this directly

Calls 2

Y_UNUSEDFunction · 0.85
operator newFunction · 0.50

Tested by

no test coverage detected