One, the Space Configurator standard interface
See "STL Source Code Anatomy" Chapter II-2.1.
Ii. SGI Space Configurator with sub-configuration force
SGI STL's Configurator differs from the standard specification by its name alloc rather than allocator, and does not accept any parameters (although SGI also defines a configurator that conforms to some standard, named Sllocator, SGI has never used it and is not recommended, Mainly because of inefficiency). This is not a problem: we rarely need to specify the Configurator name ourselves, and each of the SGI STL containers has already specified its default space configurator as Alloc.
// in the program to understand the use of SGI Configurator, you cannot use the standard notation:vector <int, std::allocator<int> > IV; // standard notation, in VC or CBvector <int, std::alloc> IV; // sgi,in GCC // SGI STL Each container has been assigned the default Space Configurator template <classclass Alloc = Alloc > // The default is to use Alloc as the Configurator class vector {...};
stl--Space Configurator (SGI-STL)