Pārlūkot izejas kodu

Increasing threshold size for traversing memory blocks (#914)

L235 - Increased the memory threshold size so that we can further reduce fragmentation by allocating memory blocks that is close to the requested size by 16 bytes.
pull/927/head
Kevin Yonan pirms 5 gadiem
committed by Ray
vecāks
revīzija
f501d42e47
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      src/rmem.h

+ 1
- 1
src/rmem.h Parādīt failu

@ -232,7 +232,7 @@ void *MemPoolAlloc(MemPool *const mempool, const size_t size)
if (mempool->freeList.head != NULL)
{
const size_t MEM_SPLIT_THRESHOLD = k">sizeof(intptr_t);
const size_t MEM_SPLIT_THRESHOLD = mi">16;
// If the freelist is valid, let's allocate FROM the freelist then!
for (MemNode **inode = &mempool->freeList.head; *inode != NULL; inode = &(*inode)->next)

Notiek ielāde…
Atcelt
Saglabāt