I have a few questions about Arenas. First a big amount of memory is allocated using platform layer code ( VirtualAlloc ) then, out of this big chunk, in many places in the code Sub arenas are created. I might be missing something, but After that Sub arena is used, I dont see it being returned to the big chunk so that is is available again for it to be used in some other parts when SubArena is used. Does that mean that whenever SubArena is used, that memory will not be available anymore during the lifetime of the game?
The most similar thing I found is temporary_memory yet it still requires an arena to be passed in order for it to be created, which means a SubArena is used to create a temporary_memory struct.
I am pretty sure I am looking at things wrong, but I am really new to this way of handling memory, so could anyone elaborate a bit on this?
Thanks