When I have studied the STL i have been through the Allocator, I have found a lot of stuff on internet and more or less i have understood what they do. I have seen a Custom Allocator to see how they are implemented, but my question is how they are used by containers, let's say into the Vector ?
They always said vector is using DEFAULT Allocator. For example the empty vector constructor is :
explicit vector (const allocator& alloc = allocator());
But how vector uses allocator ?
When and where, vector, behind the scene, is using Allocator::allocate() and Allocator::construct() ?
Knowing that, why one needs a custom allocator, what does it change ?