Skip to content

add ArenaAllocator and two generic Container types

Gerhard Raven requested to merge add-arena-allocator into master

Add two 'arena allocators' -- adapted from short_alloc by Howard Hinnant -- one which uses a non-movable arena (intended to be on the stack), and one which uses a moveable arena which is heap allocated (note: the arena itself is located inside the same allocation, and a dedicated 'handle' (which has a sizeof of a pointer) is used by the allocator.

In addition two Container types are used which use the moveable arena are introduced, one which models vector<tuple<T...>> but which is implemented as tuple<vector<T>...> where the vectors share the memory arena, and the other which treats the 'columns' completely independent, with all columns still sharing a single (movable) arena.

Edited by Gerhard Raven

Merge request reports

Loading