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

Function LFVAlloc

library/cpp/lfalloc/lf_allocX64.h:1916–1929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1914}
1915
1916static Y_FORCE_INLINE void* LFVAlloc(size_t size) {
1917 const size_t pg = N_PAGE_SIZE;
1918 void* p = nullptr;
1919
1920#if defined(LFALLOC_DBG)
1921 LFPosixMemalign(&p, pg, size);
1922#else
1923 size_t bigsize = (size + pg - 1) & (~(pg - 1));
1924 p = LFAlloc(bigsize);
1925#endif
1926
1927 Y_ASSERT_NOBT((intptr_t)p % N_PAGE_SIZE == 0);
1928 return p;
1929}
1930
1931#endif

Callers 1

vallocFunction · 0.85

Calls 2

LFPosixMemalignFunction · 0.85
LFAllocFunction · 0.85

Tested by

no test coverage detected