To be clear, there are four options you mentioned:
1. Changing the allocator used by the standard library by passing in a special allocator to instantiations of std::vector, std::map, etc.
2. Allocating raw memory elsewhere, and instantiating an object with that memory using the placement syntax for new.
3. Overriding operator new on just a particular class. This does not change the global new; it just means that objects of this class will be allocated with this version of new.
4. Overriding the global definition of new. All objects whose classes do not define their own operator new will be allocated with your own, global new.
1. Changing the allocator used by the standard library by passing in a special allocator to instantiations of std::vector, std::map, etc.
2. Allocating raw memory elsewhere, and instantiating an object with that memory using the placement syntax for new.
3. Overriding operator new on just a particular class. This does not change the global new; it just means that objects of this class will be allocated with this version of new.
4. Overriding the global definition of new. All objects whose classes do not define their own operator new will be allocated with your own, global new.
More details here: http://en.cppreference.com/w/cpp/memory/new/operator_new