Comment by teo_zero

3 years ago

If alloc() changes .beg, how do you free (release to the OS, not mark as unused) the whole arena when it's not needed anymore? Wouldn't changing .end be better, so that you can implement a destroyarena(a) which calls free(a.beg)?

Typical use: set up a specific arena just to read in the config file. Once it's done, release the whole arena.