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

Function GetOrigAllocHeader

library/cpp/lfalloc/lf_allocX64.h:1327–1334  ·  view source on GitHub ↗

if present, uses the fake header stored by LFPosixMemalign() to retrieve the original header.

Source from the content-addressed store, hash-verified

1325
1326// if present, uses the fake header stored by LFPosixMemalign() to retrieve the original header.
1327static inline TAllocHeader* GetOrigAllocHeader(void* p) {
1328 auto* header = GetAllocHeader(p);
1329 if (header->Tag == DBG_ALLOC_ALIGNED_TAG) {
1330 return (TAllocHeader*)header->Size;
1331 }
1332
1333 return header;
1334}
1335
1336PERTHREAD int AllocationTag;
1337extern "C" int SetThreadAllocTag(int tag) {

Callers 2

LFFreeFunction · 0.85
LFGetSizeFunction · 0.85

Calls 1

GetAllocHeaderFunction · 0.85

Tested by

no test coverage detected