I have an allocator system which I use everywhere in my C and C++ code.
https://github.com/gingerBill/gb/blob/master/gb.h#L1051
I store the allocators in the corresponding types if they need them but otherwise, I pass them to any function that needs them. If you don't to have to keep passing them around, you could use a context based system you pass around (by value or pointer) which can also store extra data (this is what I do in my language
Odin, and the compiler).
C++ does allow the user to have default arguments so you could have a `default_allocator()` function as the default.