Looking online for this, I mostly only see a bunch of implementations for allocators that are very old, GPA substitutes, or both. There’s occasionally allocators I find myself wanting to use that aren’t in the standard library (described below). I am open to building these myself, but I don’t want to xkcd 927. If this doesn’t exist, how interested would people here be if I made this?
A couple of allocators I’m looking for:
- Fixed buffer with robust free/realloc (buddy allocator probably?)
- Context: I have a section of memory that I have shared between CPU & GPU in my Vulkan application. A lot of things that live here have medium-term lifespans (i.e. more than a frame’s, less than the application’s). Leaking here would be especially bad because this space might be small for some configurations (like nvidia without ReBAR). I could be wrong, but
FixedBufferAllocatorseems to only free if done in reverse of allocs, which I can’t guarantee.
- Visualizer
- This might not belong in a general library unless it were super full-featured, but I’d expect it to be useful to have an allocator that generates a graph of allocated blocks of memory over time (similar to, say, a flamegraph). Haven’t looked too deep into
DebugAllocator’s metadata options, but it seems like doing it that way would heavily depend on it’s internal implementation which I want to avoid.