Benchmarked memory models for Toy_Array, read more

The results can be found in
'tests/benchmarks/array_allocation/results.md'

The results are disappointing, as 'malloc()' is simply faster in every
possible situation compared to my custom arena allocator.
This commit is contained in:
2024-12-24 10:37:54 +11:00
parent 8b5cc3b493
commit 223db840c8
8 changed files with 294 additions and 5 deletions

View File

@@ -2,10 +2,10 @@
#include "toy_common.h"
//NOTE: this structure has restrictions on it's usage:
//NOTE: this is an 'arena allocator', and has restrictions on it's usage:
// - It can only expand until it is freed
// - It cannot be copied around within RAM
// - It cannot allocate more memory than it has capacity
// - It cannot be copied or moved around in memory
// - It cannot allocate more memory than it has 'capacity'
// If each of these rules are followed, this is actually more efficient than other options
//a custom allocator