|
|
|
|
|
by CyberDildonics
1910 days ago
|
|
There are a couple of large red flags here, but why not just use an array instead of an arena allocator and a linked list (of pointers I'm guessing). If you need a linked list, use an array with indices and you can cut the size in half if you don't need 64 bit integers. If it has to be enormous, make a linked list of arrays for better locality. |
|
Which means that using array over this arena would waste more memory (due to array resizing) than linked list. When array is resized, the unused memory from the old array will stay unused until the whole arena is deallocated.