The standard exception classes can be divided into three groups:
- Exceptions for language support
- Exceptions for the C++ standard library
- Exceptions for errors outside the scope of a program
The C++ standard library uses in several places special objects to handle the allocation and deallocation
of memory. Such objects are called allocators. An allocator represents a special memory
model. It is used as abstraction to translate the need to use memory into a raw call for memory.
The use of different allocator objects at the same time allows you to use different memory models
in a program.
Allocators originally were introduced as part of the STL to handle the nasty problem of different
pointer types on PCs (such as near, far, and huge pointers). They now serve as a base for
technical solutions that use certain memory models, such as shared memory, garbage collection,
and object-oriented databases, without changing the interfaces. However, this use is relatively
new and not yet widely adopted (this will probably change).