Allocate memory.
- Parameters
-
- Returns
- Returns memory pointer.
Only allowed allocate 258KB one tme.
Determain aligned size and freelist index.
Fetch memory from freelist.
Fetch memory from cc;
Only allowed allocate 258KB one tme.
Determain aligned size and freelist index.
Fetch memory from freelist.
Fetch memory from cc;
Definition at line 28 of file ThrealCache.cpp.
29 {
34
40
45 {
47 }
48
52 else
53 {
55 }
56 }
static constexpr size_t MAX_BYTES
Only allowed 256KB allocated memory one time in tc.
static size_t Index(size_t size)
Determine which freelist should process the memory block with given bytes.
static size_t AlignUp(size_t size)
Align up memory bytes.
void * FetchFromCentralCache(size_t index, size_t alignSize)
Fetch memory from central cache if this is run out.
std::array< scl::free_list, MemoryPool::FREE_LIST_NUM > m_FreeLists
FreeList Array.