Compelling examples of custom C++ allocators?

What are some really good reasons to ditch std::allocator in favor of a custom solution? Have you run across any situations where it was absolutely necessary for correctness, performance, scalability, etc? Any really clever examples?

Custom allocators have always been a feature of the Standard Library that I haven’t had much need for. I was just wondering if anyone here on SO could provide some compelling examples to justify their existence.

17 Answers
17

Leave a Comment