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

Method Free

library/cpp/lfalloc/lf_allocX64.h:707–713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

705
706public:
707 Y_FORCE_INLINE void Free(void* ptr) {
708 TNode* newFree = (TNode*)ptr;
709 if (AtomicAdd(AllocCount, 0) == 0)
710 Enqueue(&Head, newFree);
711 else
712 Enqueue(&Pending, newFree);
713 }
714 Y_FORCE_INLINE void* Alloc() {
715 TAtomic keepCounter = AtomicAdd(PendingToFreeListCounter, 0);
716 TNode* fl = Pending;

Callers 4

DefragmentMemFunction · 0.45
TrackPerTagDeallocationFunction · 0.45

Calls 2

AtomicAddFunction · 0.70
EnqueueFunction · 0.50

Tested by

no test coverage detected