allocator_base Class
Defines the base class and common functions needed to create a user-defined allocator from a synchronization filter.
template <class Type, class Sync> class allocator_base
Parameters
Parameter |
Description |
---|---|
Type |
The type of elements allocated by the allocator. |
Sync |
The synchronization policy for the allocator, which is sync_none Class, sync_per_container Class, sync_per_thread Class, or sync_shared Class. |
Constructors
Constructs an object of type allocator_base. |
TypeDefs
A type that provides a constant pointer to the type of object managed by the allocator. |
|
A type that provides a constant reference to type of object managed by the allocator. |
|
A signed integral type that can represent the difference between values of pointers to the type of object managed by the allocator. |
|
A type that provides a pointer to the type of object managed by the allocator. |
|
A type that provides a reference to the type of object managed by the allocator. |
|
An unsigned integral type that can represent the length of any sequence that an object of template class allocator_base can allocate. |
|
A type that is managed by the allocator. |
Member Functions
Allocates storage for an array of type char. |
|
Frees storage for the array containing elements of type char. |
|
Finds the address of an object whose value is specified. |
|
Allocates a block of memory large enough to store at least some specified number of elements. |
|
Constructs a specific type of object at a specified address that is initialized with a specified value. |
|
Frees a specified number of objects from storage beginning at a specified position. |
|
Calls an objects destructor without deallocating the memory where the object was stored. |
|
Returns the number of elements of type Type that could be allocated by an object of class allocator before the free memory is used up. |
Requirements
Header: <allocators>
Namespace: stdext