u/Silver-North1136in r/C_Programming • Recommends
On “Arena Allocators in C”
One neat thing you can do with arena allocators, and when dealing with memory this way in general, is that you can map (mmap/VirtualAlloc) way more memory than you'll ever realistically need at the start of your program, and none of it will actually be used until you touch the page it's in. Trying to make it dynamically resize on the other hand will require you to manually manage this, which often will result in bugs and extra complexity that isn't actually necessary.
Nic Barker recently started a new series on this topic. It's a good resource for this kind of thing.
(link to this video