2 ms·
> In fairness std::allocator has always been a wreck std::allocator is just fine - it's no more and no less than a wrapper around malloc/free and that's what i
by menaerus 3y ago
> In fairness std::allocator has always been a wreck
std::allocator is just fine - it's no more and no less than a wrapper around malloc/free and that's what it really only needs to be. If you need a different allocation scheme that your workload is going to benefit from: (1) you first need to come up with it by finding out what scheme is going to benefit you, (2) you then implement it through a custom allocator.
> Most per-method allocations should be pointer bumped in an arena ... and the languages just don’t encourage it.
System malloc implementation will do that by themselves whenever they see fit. And this is not the programming language problem to begin with at all.