问题
Is there any open-source allocator (possibly in Boost) that can be used with std::wstring
implementing a fast allocation pattern like the one showed in this blog post?
Boost.Pool doesn't seem well suited for this purpose.
回答1:
No, there isn't (I searched for a couple of hours, once). If you don't care to release memory during usage, it is fairly simple to do yourself. If you want to release it dynamically, then it becomes a lot of work regarding free list management, LRU, etc.
来源:https://stackoverflow.com/questions/10462806/custom-allocator-for-fast-stdwstring-allocations