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

Function LFAllocNoCache

library/cpp/lfalloc/lf_allocX64.h:934–941  ·  view source on GitHub ↗

allocate single block

Source from the content-addressed store, hash-verified

932
933// allocate single block
934static Y_FORCE_INLINE void* LFAllocNoCache(int nSizeIdx, EDefrag defrag) {
935 int blockSize = nSizeIdxToSize[nSizeIdx];
936 void* res = LFAllocFromCurrentChunk(nSizeIdx, blockSize, 1);
937 if (res)
938 return res;
939
940 return SlowLFAlloc(nSizeIdx, blockSize, defrag);
941}
942
943// allocate multiple blocks, returns number of blocks allocated (max FL_GROUP_SIZE)
944// buf should have space for at least FL_GROUP_SIZE elems

Callers 2

LFAllocImplFunction · 0.85

Calls 2

LFAllocFromCurrentChunkFunction · 0.85
SlowLFAllocFunction · 0.85

Tested by

no test coverage detected