Library Idea
Custom Allocators


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

Comment on This Page

  • Robert Ramey says:

    The following presentation from CPPCon 2014 is interesting and relevant to this idea

    https://www.youtube.com/watch?v=YkiYOP3d64E