Next : Containers, Previous : Function objects, Top : Table of Contents
One of the common problems in portability is to be able to encapsulate the information about the memory model. This information includes the knowledge of pointer types, the type of their difference, the type of the size of objects in this memory model, as well as the memory allocation and deallocation primitives for it.
STL addresses this problem by providing a standard set of requirements for allocators, which are objects that encapsulate this information. All of the containers in STL are parameterized in terms of allocators. That dramatically simplifies the task of dealing with multiple memory models.
|