3 ms·
That's not an arena. The whole point of an arena is deallocation of all elements allocated from that arena is a constant time bulk operation. I've seen both, y
by CyberDildonics 3y ago
That's not an arena. The whole point of an arena is deallocation of all elements allocated from that arena is a constant time bulk operation.
I've seen both, you can use empty cells to link to the next empty cell and the head pointer to link to the first empty cell in the chain so that the cells can be arbitrarily freed, but the option is always there to do what you said and do a single bulk deallocation of the actual heap memory allocation instead of dealing with individual cells.
My point in all this is the same thing you have been implying. There aren't many differences in techniques so when people are talking about 'arena allocators' most of the time they should just be using a vector.