by Robert Ramey
STL collections have at template parameter so specify a “custom allocator”. This permits users to specify their own allocator to support specialized functionality. Why would anyone want to do this? Turns out that there are a number of situations where making a custom allocator can be very useful. This post http://stackoverflow.com/questions/826569/compelling-examples-of-custom-c-allocators describes a number of them. One can find an example of a custom allocator at http://www.drdobbs.com/cpp/improving-performance-with-custom-pool-a/184406243 .
It would nice to have a set of custom allocators ready to use for different situations.
There are 1 comments