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

Function AddFreeChunk

library/cpp/lfalloc/lf_allocX64.h:262–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260static volatile int freeChunkCount;
261
262static void AddFreeChunk(uintptr_t chunkId) {
263 chunkSizeIdx[chunkId] = -1;
264 if (Y_UNLIKELY(freeChunkCount == FREE_CHUNK_ARR_BUF))
265 NMalloc::AbortFromCorruptedAllocator("free chunks array overflowed");
266 freeChunkArr[freeChunkCount++] = chunkId;
267}
268
269static bool GetFreeChunk(uintptr_t* res) {
270 if (freeChunkCount == 0) {

Callers 2

DefragmentMemFunction · 0.85
SlowLFAllocFunction · 0.85

Calls 1

Tested by

no test coverage detected