A component of C++'s Standard Library, in charge of handling the requests for allocation and deallocation of memory for a container.
Allocators are an important component of the C++ Standard Library. The standard library provides several containers which can change size during the execution of the program. To achieve this, some form of dynamic memory allocation is usually required. Allocators handle all the requests for allocation and deallocation of memory for a given container, and are also used to call constructors and destructors of the container elements.