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

Function LargeBlockUnmap

library/cpp/lfalloc/lf_allocX64.h:430–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428
429
430static void LargeBlockUnmap(void* p, size_t pages) {
431 const auto bytes = (pages + 1) * uintptr_t(4096);
432
433 IncrementCounter(CT_MUNMAP, bytes);
434 IncrementCounter(CT_MUNMAP_CNT, 1);
435#ifdef _MSC_VER
436 Y_ASSERT_NOBT(0);
437#else
438 TLargeBlk::As(p)->Mark(ELarge::Gone);
439 munmap((char*)p - 4096ll, bytes);
440#endif
441}
442
443//////////////////////////////////////////////////////////////////////////
444const size_t LB_BUF_SIZE = 250;

Callers 3

LargeBlockAllocFunction · 0.85
FreeAllLargeBlockMemFunction · 0.85
LargeBlockFreeFunction · 0.85

Calls 2

IncrementCounterFunction · 0.85
MarkMethod · 0.45

Tested by

no test coverage detected