aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin Yonan <assyrianic@users.noreply.github.com>2019-07-22 01:17:27 -0700
committerRay <raysan5@gmail.com>2019-07-22 10:17:27 +0200
commitf501d42e475d642fcc5ea5f96ce11a13ce3455fb (patch)
tree2e652c802e439853d73b22730d497f6104aed7e9 /src
parent4b2f6b2b5f5b3432e41c5e30e985bc716870f892 (diff)
downloadraylib-f501d42e475d642fcc5ea5f96ce11a13ce3455fb.tar.gz
raylib-f501d42e475d642fcc5ea5f96ce11a13ce3455fb.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/rmem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rmem.h b/src/rmem.h
index 25220781..65e08194 100644
--- a/src/rmem.h
+++ b/src/rmem.h
@@ -232,7 +232,7 @@ void *MemPoolAlloc(MemPool *const mempool, const size_t size)
if (mempool->freeList.head != NULL)
{
- const size_t MEM_SPLIT_THRESHOLD = sizeof(intptr_t);
+ const size_t MEM_SPLIT_THRESHOLD = 16;
// If the freelist is valid, let's allocate FROM the freelist then!
for (MemNode **inode = &mempool->freeList.head; *inode != NULL; inode = &(*inode)->next)