[#BloombergLP-bslma]
= xref:BloombergLP.adoc[BloombergLP]::bslma
:relfileprefix: ../
:mrdocs:

Package namespace for memory&hyphen;allocation mechanisms&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/AAModel.adoc[`AAModel`] 
| Metafunction that yields (is derived from) a model tag type that indicates the AA model preferred for the specified type &hyphen;&hyphen; one of `AAModelPmr`, `AAModelBsl`, `AAModelLegacy`, `AAModelStl`, or `AAModelNone`&period; If `TYPE` supports more than one of AA models, then the result is the first in the preceding list that is supported&period;
| xref:BloombergLP/bslma/AAModelBsl.adoc[`AAModelBsl`] 
| Model tag for bsl&hyphen;AA types&period;
| xref:BloombergLP/bslma/AAModelIsSupported-06.adoc[`AAModelIsSupported`] 
| Predicate metafunction that determines if the specified `TYPE` supports the specified `MODEL` AA model&period; It yields (i&period;e&period;, is derived from) `bsl&colon;true&lowbar;type` if type `TYPE` supports AA model `MODEL`&semi; otherwise it yields `false&lowbar;type`&period; `MODEL` Must be one of `AAModelNone`, `AAModelLegacy`, `AAModelBsl`, `AAModelPmr`, or `AAModelStl`&period; This metafunction can yield `true&lowbar;type` for more than one type `MODEL` type, e&period;g&period;, it will yield `true&lowbar;type` if `TYPE` is *bsl&hyphen;AA*, and `MODEL` is either `AAModelBsl` or `AAModelLegacy`, since `TYPE` can be constructed with either allocator type&period;
| xref:BloombergLP/bslma/AAModelLegacy.adoc[`AAModelLegacy`] 
| Model tag for legacy&hyphen;AA types&period;
| xref:BloombergLP/bslma/AAModelNone.adoc[`AAModelNone`] 
| Model tag for non&hyphen;AA types&period;
| xref:BloombergLP/bslma/AAModelPmr.adoc[`AAModelPmr`] 
| Model tag for pmr&hyphen;AA types&period;
| xref:BloombergLP/bslma/AAModelStl.adoc[`AAModelStl`] 
| Model tag for stl&hyphen;AA types&period;
| xref:BloombergLP/bslma/AATypeUtil.adoc[`AATypeUtil`] 
| Namespace for utility functions on allocator&hyphen;aware types
| xref:BloombergLP/bslma/Allocator.adoc[`Allocator`] 
| This protocol class provides a pure abstract interface and contract for clients and suppliers of raw memory&period; If the requested memory cannot be returned, the contract requires that an `std&colon;&colon;bad&lowbar;alloc` exception be thrown&period; Note that memory is guaranteed to be sufficiently aligned for any object of the requested size on the current platform, which may be less than the maximal alignment guarantee afforded by global `operator new`&period;
| xref:BloombergLP/bslma/AllocatorTraits_CallMaxSize-07.adoc[`AllocatorTraits&lowbar;CallMaxSize`] 
| Fallback `max&lowbar;size` implementation when the allocator does not provide its own `max&lowbar;size` member function&period;
| xref:BloombergLP/bslma/AllocatorTraits_ConstPointerType-04.adoc[`AllocatorTraits&lowbar;ConstPointerType`] 
| Metafunction that yields the const pointer type for the specified (template parameter) `T`&period;
| xref:BloombergLP/bslma/AllocatorTraits_ConstVoidPointerType-09.adoc[`AllocatorTraits&lowbar;ConstVoidPointerType`] 
| Metafunction that yields the const void pointer type for the specified (template parameter) `T`&period; If `T` defines a nested alias named `const&lowbar;void&lowbar;pointer`, then `type` is `T&colon;&colon;const&lowbar;void&lowbar;pointer`&semi; otherwise `type` is `const void &ast;`&period;
| xref:BloombergLP/bslma/AllocatorTraits_DifferenceType-0d.adoc[`AllocatorTraits&lowbar;DifferenceType`] 
| Metafunction that yields the difference type for the specified (template parameter) `T`&period; If `T` defines a nested alias named `difference&lowbar;type`, then `type` is `T&colon;&colon;difference&lowbar;type`&semi; otherwise `type` is `std&colon;&colon;ptrdiff&lowbar;t`&period;
| xref:BloombergLP/bslma/AllocatorTraits_HasConstructMethod.adoc[`AllocatorTraits&lowbar;HasConstructMethod`] 
| This `struct` template provides a mechanism for determining whether a given (template parameter) `T` defines a `construct` method with the specified return type and argument types&period;
| xref:BloombergLP/bslma/AllocatorTraits_HasDestroyMethod.adoc[`AllocatorTraits&lowbar;HasDestroyMethod`] 
| Metafunction that detects whether `T` provides a `destroy` method with the specified signature&period;
| xref:BloombergLP/bslma/AllocatorTraits_HasIsAlwaysEqual.adoc[`AllocatorTraits&lowbar;HasIsAlwaysEqual`] 
| This `struct` template provides a mechanism for determining whether a given (template parameter) `ALLOCATOR&lowbar;TYPE` defines a nested alias named`is&lowbar;always&lowbar;equal`&period; The static boolean member `value` (nested alias named `type`) is `true` (`bsl&colon;&colon;true&lowbar;type`) if `ALLOCATOR&lowbar;TYPE` defines such an alias, and `false` (`bsl&colon;&colon;false&lowbar;type`) otherwise&period;
| xref:BloombergLP/bslma/AllocatorTraits_HasPropOnCopyAssign.adoc[`AllocatorTraits&lowbar;HasPropOnCopyAssign`] 
| This `struct` template provides a mechanism for determining whether a given (template parameter) `ALLOCATOR&lowbar;TYPE` defines a nested alias named`propagate&lowbar;on&lowbar;container&lowbar;copy&lowbar;assignment`&period; The static boolean member `value` (nested alias named `type`) is `true` (`bsl&colon;&colon;true&lowbar;type`) if `ALLOCATOR&lowbar;TYPE` defines such an alias, and `false` (`bsl&colon;&colon;false&lowbar;type`) otherwise&period;
| xref:BloombergLP/bslma/AllocatorTraits_HasPropOnMoveAssign.adoc[`AllocatorTraits&lowbar;HasPropOnMoveAssign`] 
| This `struct` template provides a mechanism for determining whether a given (template parameter) `ALLOCATOR&lowbar;TYPE` defines a nested alias named`propagate&lowbar;on&lowbar;container&lowbar;move&lowbar;assignment`&period; The static boolean member `value` (nested alias named `type`) is `true` (`bsl&colon;&colon;true&lowbar;type`) if `ALLOCATOR&lowbar;TYPE` defines such an alias, and `false` (`bsl&colon;&colon;false&lowbar;type`) otherwise&period;
| xref:BloombergLP/bslma/AllocatorTraits_HasPropOnSwap.adoc[`AllocatorTraits&lowbar;HasPropOnSwap`] 
| This `struct` template provides a mechanism for determining whether a given (template parameter) `ALLOCATOR&lowbar;TYPE` defines a nested alias named`propagate&lowbar;on&lowbar;container&lowbar;swap`&period; The static boolean member `value` (nested alias named `type`) is `true` (`bsl&colon;&colon;true&lowbar;type`) if `ALLOCATOR&lowbar;TYPE` defines such an alias, and `false` (`bsl&colon;&colon;false&lowbar;type`) otherwise&period;
| xref:BloombergLP/bslma/AllocatorTraits_HasSelectOnCopyMethod.adoc[`AllocatorTraits&lowbar;HasSelectOnCopyMethod`] 
| This `struct` template provides a mechanism for determining whether a given (template parameter) `ALLOCATOR&lowbar;TYPE` defines a `const` member function named `select&lowbar;on&lowbar;container&lowbar;copy&lowbar;construction` that takes no arguments and returns an `ALLOCATOR&lowbar;TYPE` object by value&period; The static boolean `value` (nested `type` alias) is `true` (`bsl&colon;&colon;true&lowbar;type`) if `ALLOCATOR&lowbar;TYPE` defines such a method, and `false` (`bsl&colon;&colon;false&lowbar;type`) otherwise&period;
| xref:BloombergLP/bslma/AllocatorTraits_IsAlwaysEqual-0e.adoc[`AllocatorTraits&lowbar;IsAlwaysEqual`] 
| This `struct` template sets the boolean type for the attribute named `is&lowbar;always&lowbar;equal` to the nested type alias in the given (template parameter) `ALLOC` if `ALLOC` defines such an alias (i&period;e&period;, if `true &equals;&equals; AllocatorTraits&lowbar;HasIsAlwaysEqual&lt;ALLOCATOR&lowbar;TYPE&gt;&colon;&colon;value`)&period;
| xref:BloombergLP/bslma/AllocatorTraits_PointerType-0e.adoc[`AllocatorTraits&lowbar;PointerType`] 
| Metafunction that yields the pointer type for the specified (template parameter) `T`&period; If `T` defines a nested alias named `pointer`, then `type` is `T&colon;&colon;pointer`&semi; otherwise `type` is `T&colon;&colon;value&lowbar;type &ast;`&period;
| xref:BloombergLP/bslma/AllocatorTraits_PropOnCopyAssign-0a.adoc[`AllocatorTraits&lowbar;PropOnCopyAssign`] 
| This `struct` template sets the boolean type for the attribute named `propagate&lowbar;on&lowbar;container&lowbar;copy&lowbar;assignment` to `bsl&colon;&colon;false&lowbar;type` if the given (template parameter) `ALLOCATOR&lowbar;TYPE` does not define such an alias (i&period;e&period;, `false &equals;&equals; AllocatorTraits&lowbar;HasPropOnCopyAssign&lt;ALLOCATOR&lowbar;TYPE&gt;&colon;&colon;value`)&period;
| xref:BloombergLP/bslma/AllocatorTraits_PropOnMoveAssign-05.adoc[`AllocatorTraits&lowbar;PropOnMoveAssign`] 
| This `struct` template sets the boolean type for the attribute named `propagate&lowbar;on&lowbar;container&lowbar;move&lowbar;assignment` to `bsl&colon;&colon;false&lowbar;type` if the given (template parameter) `ALLOCATOR&lowbar;TYPE` does not define such an alias (i&period;e&period;, `false &equals;&equals; AllocatorTraits&lowbar;HasPropOnMoveAssign&lt;ALLOCATOR&lowbar;TYPE&gt;&colon;&colon;value`)&period;
| xref:BloombergLP/bslma/AllocatorTraits_PropOnSwap-07.adoc[`AllocatorTraits&lowbar;PropOnSwap`] 
| This `struct` template sets the boolean type for the attribute named `propagate&lowbar;on&lowbar;container&lowbar;swap` to `bsl&colon;&colon;false&lowbar;type` if the given (template parameter) `ALLOCATOR&lowbar;TYPE` does not define such an alias (i&period;e&period;, `false &equals;&equals; AllocatorTraits&lowbar;HasPropOnSwap&lt;ALLOCATOR&lowbar;TYPE&gt;&colon;&colon;value`)&period;
| xref:BloombergLP/bslma/AllocatorTraits_RebindAlloc-0a.adoc[`AllocatorTraits&lowbar;RebindAlloc`] 
| should be pointer&lowbar;traits&colon;&colon;rebind of template above
| xref:BloombergLP/bslma/AllocatorTraits_RebindFront-0d.adoc[`AllocatorTraits&lowbar;RebindFront`] 
| There shall be no member named `type` unless T is a class template with only type parameters&period;
| xref:BloombergLP/bslma/AllocatorTraits_SizeType-0c.adoc[`AllocatorTraits&lowbar;SizeType`] 
| Metafunction that yields the size type for the specified (template parameter) `T`&period;
| xref:BloombergLP/bslma/AllocatorTraits_VoidPointerType-08c.adoc[`AllocatorTraits&lowbar;VoidPointerType`] 
| Metafunction that yields the void pointer type for the specified (template parameter) `T`&period;
| xref:BloombergLP/bslma/AllocatorUtil.adoc[`AllocatorUtil`] 
| Namespace for utility functions on allocators
| xref:BloombergLP/bslma/AllocatorUtil_Traits-02.adoc[`AllocatorUtil&lowbar;Traits`] 
| Extend the notion of `allocator&lowbar;traits` to apply to both standard allocator and to pointer&hyphen;to&hyphen;memory&hyphen;resource types&period; If the (template parameter) `t&lowbar;ALLOCATOR` is a non&hyphen;pointer type (i&period;e&period;, an allocator class), then inherits from `bsl&colon;&colon;allocator&lowbar;traits&lt;t&lowbar;ALLOCATOR&gt;&colon;&colon;rebind&lowbar;traits&lt;t&lowbar;TYPE&gt;`&period; However, if `t&lowbar;ALLOCATOR` is a pointer type, then inherits from `bsl&colon;&colon;allocator&lowbar;traits&lt;bsl&colon;&colon;allocator&lt;t&lowbar;TYPE&gt;&gt;` for pointers to classes derived from `bslma&colon;&colon;Allocator` and from `bsl&colon;&colon;allocator&lowbar;traits&lt;bsl&colon;&colon;polymorphic&lowbar;allocator&lt;t&lowbar;TYPE&gt;&gt;` for pointers to other classes derived from `bsl&colon;&colon;memory&lowbar;resource`&period; This primary template is for non&hyphen;pointer `t&lowbar;ALLOCATOR` template arguments&period;
| xref:BloombergLP/bslma/AutoDeallocator.adoc[`AutoDeallocator`] 
| This class implements a range proctor that, unless its `release` method has previously been invoked, automatically deallocates the contiguous sequence of managed memory blocks upon its own destruction by invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; Each of the managed memory blocks must have been supplied by this allocator (or pool), which must remain valid throughout the lifetime of the range proctor&period; Note that when the length of this object is non&hyphen;zero, it must refer to a non&hyphen;null array of memory blocks&period;
| xref:BloombergLP/bslma/AutoDestructor.adoc[`AutoDestructor`] 
| This class implements a range proctor that, unless its `release` method has previously been invoked, automatically destroys the contiguous sequence of managed objects upon its own destruction by invoking each object&apos;s destructor&period; If `release` is invoked (see `release`), the proctor will not destroy any objects upon its own destruction (unless `reset` is invoked to assign the proctor another contiguous sequence of objects for management)&period; Note that when the length of this object is non&hyphen;zero, it must refer to a non&hyphen;null array of objects&period;
| xref:BloombergLP/bslma/AutoRawDeleter.adoc[`AutoRawDeleter`] 
| This class implements a range proctor that, unless its `release` method has previously been invoked, automatically deletes the contiguous sequence of managed objects upon destruction by iterating on each (managed) object, first invoking the object&apos;s destructor, and then free memory by invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; The sequence of managed objects of parameterized `TYPE` must have been created using memory provided by this allocator (or pool), which must remain valid throughout the lifetime of this range proctor&period; Note that when the length of this object is non&hyphen;zero, it must refer to a non&hyphen;null array of objects&period;
| xref:BloombergLP/bslma/BslAllocator_Voidish.adoc[`BslAllocator&lowbar;Voidish`] 
| Object type that will be placeholder for &apos;void&apos;
| xref:BloombergLP/bslma/BufferAllocator.adoc[`BufferAllocator`] 
| This `class` provides a concrete buffer allocator that implements the `Allocator` interface, and allocates memory blocks from a fixed&hyphen;size buffer that is supplied by the user at construction&period; The allocator can supply memory that can be maximally (default) or naturally aligned&period;
| xref:BloombergLP/bslma/ConstructionUtil.adoc[`ConstructionUtil`] 
| This `struct` provides a namespace for utility functions that construct elements of (a template parameter) `TARGET&lowbar;TYPE`&period;
| xref:BloombergLP/bslma/ConstructionUtil_AllocAdaptorUtil-06.adoc[`ConstructionUtil&lowbar;AllocAdaptorUtil`] 
| Component&hyphen;private utility for adapting allocator objects (see specializations)&period;
| xref:BloombergLP/bslma/ConstructionUtil_ConstructionTrait.adoc[`ConstructionUtil&lowbar;ConstructionTrait`] 
| Metafunction yielding one of the following three `value` constants&colon;
| xref:BloombergLP/bslma/ConstructionUtil_IsAllocatorPtr-06.adoc[`ConstructionUtil&lowbar;IsAllocatorPtr`] 
| Metafunction that inherits from `true&lowbar;type` if the `ALLOC` type is a pointer to `bslma&colon;&colon;Allocator` or a class derived from it and `false&lowbar;type` otherwise&period;
| xref:BloombergLP/bslma/DeallocateBytesProctor.adoc[`DeallocateBytesProctor`] 
| This class implements a proctor that, unless its `release` method has previously been invoked, automatically deallocates a managed block of memory upon destruction by invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; The managed memory block must have been provided by the supplied allocator (or pool)&semi; the allocator (or pool) must remain valid throughout the lifetime of the proctor object&period; If `ALLOCATOR` is a non&hyphen;pointer type, it is assumed to be STL compatible&semi; otherwise it is assumed have the same deallocation interface as `bslma&colon;&colon;Allocator`&period;
| xref:BloombergLP/bslma/DeallocateBytesProctor_PtrType-0e7.adoc[`DeallocateBytesProctor&lowbar;PtrType`] 
| This metafunction has a nested `type` that indicates the correct `void` pointer type to use to manage bytes allocated from an allocator having the specified `ALLOCATOR` template parameter type&period; This primary template yields the `void&lowbar;pointer` type specified by the `allocator&lowbar;traits` for `ALLOCATOR`&period;
| xref:BloombergLP/bslma/DeallocateObjectProctor.adoc[`DeallocateObjectProctor`] 
| This class implements a proctor that, unless its `release` method has previously been invoked, automatically deallocates a managed object upon destruction by invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; The managed object of parameterized `TYPE` must be memory that was provided by this allocator (or pool)&semi; the allocator (or pool) must remain valid throughout the lifetime of the proctor object&period; If `ALLOCATOR` is a non&hyphen;pointer type, it is assumed to be STL compatible&semi; otherwise, it is assumed have a `deallocate` method with a single &apos;void &ast;&apos; parameter, i&period;e&period;, the same deallocation interface as `bslma&colon;&colon;Allocator`&period;
| xref:BloombergLP/bslma/DeallocateObjectProctor_PtrType-0d.adoc[`DeallocateObjectProctor&lowbar;PtrType`] 
| This metafunction has a nested `type` that indicates the correct pointer type to use to manage an object of the specified `TYPE` template parameter allocated from an allocator having the specified `ALLOCATOR` template parameter type&period; This primary template yields the pointer type specified by `ALLOCATOR`, after rebinding to the specified `TYPE`&period;
| xref:BloombergLP/bslma/DeallocatorGuard.adoc[`DeallocatorGuard`] 
| This class implements a guard that unconditionally deallocates a block of managed memory upon destruction by invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; The managed memory must have been supplied by the allocator (or pool), which must remain valid throughout the lifetime of the guard object&period;
| xref:BloombergLP/bslma/DeallocatorProctor.adoc[`DeallocatorProctor`] 
| This class implements a proctor that, unless its `release` method has previously been invoked, automatically deallocates a block of managed memory upon destruction by invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; The managed memory must have been provided by this allocator (or pool), which must remain valid throughout the lifetime of the proctor object&period;
| xref:BloombergLP/bslma/Default.adoc[`Default`] 
| This struct is a mechanism with global state, i&period;e&period;, all state is held in global variables and all functions are class methods&period; The state consists of two distinct parts that don&apos;t influence one another&colon; the default allocator and the global allocator&period; All addresses are stored without assuming ownership&period;
| xref:BloombergLP/bslma/DefaultAllocatorGuard.adoc[`DefaultAllocatorGuard`] 
| Upon construction, an object of this class saves the current default allocator and installs the user&hyphen;specified allocator as the default allocator&period; On destruction, the original default allocator is restored&period; Objects of this class are intended for testing purposes _only_ and are _not_ guaranteed to be safe in production environments&period;
| xref:BloombergLP/bslma/Default_NewDeleteSetter.adoc[`Default&lowbar;NewDeleteSetter`] 
| Stateless class to set the initial default resource to `bslma&colon;&colon;NewDeleteAllocator` automatically when using this component with a platform that supports C&plus;&plus;17 `std&colon;&colon;pmr&colon;&colon;memory&lowbar;resource`&period;
| xref:BloombergLP/bslma/DeleteObjectProctor.adoc[`DeleteObjectProctor`] 
| This class implements a proctor that, unless its `release` method has previously been invoked, automatically deletes a managed object upon destruction by first invoking the object&apos;s destructor, and then invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; The managed object of parameterized `TYPE` must have been created using memory provided by this allocator (or pool), which must remain valid throughout the lifetime of the proctor object&period; If `ALLOCATOR` is a non&hyphen;pointer type, it is assumed to be STL compatible&semi; otherwise, it is assumed have a `deallocate` method with a single `void &ast;` parameter, i&period;e&period;, the same deallocation interface as `bslma&colon;&colon;Allocator`&period;
| xref:BloombergLP/bslma/DeleteObjectProctor_PtrType-0e.adoc[`DeleteObjectProctor&lowbar;PtrType`] 
| This metafunction has a nested `type` that indicates the correct pointer type to use to manage an object of the specified `TYPE` template parameter allocated from an allocator having the specified `ALLOCATOR` template parameter type&period; This primary template yields the pointer type specified by `ALLOCATOR`, after rebinding to the specified `TYPE`&period;
| xref:BloombergLP/bslma/DeleterHelper.adoc[`DeleterHelper`] 
| This struct provides a namespace for helper functions used for deleting objects in various pools and allocators&period;
| xref:BloombergLP/bslma/DeleterHelper_Helper-0f.adoc[`DeleterHelper&lowbar;Helper`] 
| Helper template for `DeleterHelper` dispatch by polymorphism&period;
| xref:BloombergLP/bslma/DestructionUtil.adoc[`DestructionUtil`] 
| This `struct` provides a namespace for a suite of utility functions that destroy elements of the parameterized type `TYPE`&period; Depending on the traits of `TYPE`, the destructor may be invoked or not (i&period;e&period;, optimized away as a no&hyphen;op)&period;
| xref:BloombergLP/bslma/DestructorGuard.adoc[`DestructorGuard`] 
| This class implements a guard that unconditionally destroys a managed object upon destruction by invoking the (managed) object&apos;s destructor&period;
| xref:BloombergLP/bslma/DestructorProctor.adoc[`DestructorProctor`] 
| This class implements a proctor that, unless its `release` method has previously been invoked, automatically destroys a managed object upon destruction by invoking the (managed) object&apos;s destructor&period;
| xref:BloombergLP/bslma/ExceptionGuard.adoc[`ExceptionGuard`] 
| This class provide a mechanism to verify the strong exception guarantee in exception&hyphen;throwing code&period; On construction, this class stores the a copy of an object of the parameterized type `OBJECT` and the address of that object&period; On destruction, if `release` was not invoked, it will verify the value of the object is the same as the value of the copy create on construction&period; This class requires the copy constructor and `operator &equals;&equals;` to be tested before use&period;
| xref:BloombergLP/bslma/HasAllocatorType-00.adoc[`HasAllocatorType`] 
| This metafunction yields `bsl&colon;&colon;true&lowbar;type` if the specified template&hyphen;parameter `TYPE` has a nested type named `allocator&lowbar;type` that meets the requirements for a C&plus;&plus;11 allocator, and `bsl&colon;&colon;false&lowbar;type` otherwise&period; This primary template, yielding `false&lowbar;type`, is instantiated for types for which `allocator&lowbar;type` does not exist or is not an allocator type&period; Note that instantiation will fail if `allocator&lowbar;type` exists but is not public within `TYPE` or if any of the required members of `TYPE&colon;&colon;allocator&lowbar;type` exist but are not public (though only `value&lowbar;type` and `allocate` are tested at present)&period;
| xref:BloombergLP/bslma/InfrequentDeleteBlockList.adoc[`InfrequentDeleteBlockList`] 
| This class implements a memory manager that allocates and manages a sequence of memory blocks, each potentially of a different size as specified in the `allocate` method&apos;s invocation&period; This object&apos;s `release` method deallocates the entire sequence of memory blocks, as does its destructor&period; Note that memory blocks can not be deallocated individually&period;
| xref:BloombergLP/bslma/IsStdAllocator-07.adoc[`IsStdAllocator`] 
| Metafunction to determine whether the specified template parameter `TYPE` meets the minimum requirements for a C&plus;&plus;11 allocator&period; Specifically, this `struct` is derived from `true&lowbar;type` if `TYPE` has a nested `value&lowbar;type` and supports the operation `a&period;allocate(bytes)`, where `a` has type `TYPE` and `bytes` has type `allocator&lowbar;traits&lt;TYPE&gt;&colon;&colon;size&lowbar;type`&semi; otherwise it is derived from `false&lowbar;type`&period;
| xref:BloombergLP/bslma/IsStdAllocator_SizeType-04.adoc[`IsStdAllocator&lowbar;SizeType`] 
| This component&hyphen;private metafunction determines the appopriate size type for a specified template parameter `TYPE`&period; The nested `type` typedef is `TYPE&colon;&colon;size&lowbar;type` if such a type exists and `std&colon;&colon;size&lowbar;t` otherwise&period; Note that this metafunction produces the same type as `bsl&colon;&colon;allocator&lowbar;traits&lt;TYPE&gt;&colon;&colon;size&lowbar;type`, but avoids a dependency on `bslma&lowbar;allocatortraits` and is guaranteed to compile even if `TYPE` is not an allocator type&period;
| xref:BloombergLP/bslma/MallocFreeAllocator.adoc[`MallocFreeAllocator`] 
| This class provides direct access to the system&hyphen;supplied (native) global `std&colon;&colon;malloc` and `std&colon;&colon;free`&period; A `static` method is provided for obtaining a unique, process wide object of this class, which is valid from the time the method is called until after the program (not just `main`) exits&period;
| xref:BloombergLP/bslma/ManagedAllocator.adoc[`ManagedAllocator`] 
| Provide a protocol for allocators with the ability to `release` all memory currently allocated through the protocol back to the memory supplier of the derived concrete allocator object&period;
| xref:BloombergLP/bslma/ManagedPtr-0fa.adoc[`ManagedPtr`] 
| This class is a &quot;smart pointer&quot; that refers to a _target_ object accessed via a pointer to the specified parameter type, `TARGET&lowbar;TYPE`, and that supports sole ownership of a _managed_ object that is potentially of a different type, and may be an entirely different object from the target object&period; A managed pointer ensures that the object it manages is destroyed when the managed pointer is destroyed (or re&hyphen;assigned), using the &quot;deleter&quot; supplied along with the managed object&period; The target object referenced by a managed pointer may be accessed using either the `&hyphen;&gt;` operator, or the dereference operator (`operator &ast;`)&period; The specified `TARGET&lowbar;TYPE` may be `const`&hyphen;qualified, but may not be `volatile`&hyphen;qualified, nor may it be a reference type&period;
| xref:BloombergLP/bslma/ManagedPtrDeleter.adoc[`ManagedPtrDeleter`] 
| This complex constrained in&hyphen;core value&hyphen;semantic class holds the information necessary for `ManagedPtr` to correctly manage its underlying object, namely the addresses of `object` and `factory`, and the `deleter` function, optionally supplied through the constructors or through the `set` method&period; This information is stored in a sub&hyphen;structure to allow the compiler to copy it more efficiently&period;
| xref:BloombergLP/bslma/ManagedPtrNilDeleter.adoc[`ManagedPtrNilDeleter`] 
| This utility class provides a general no&hyphen;op deleter, which is useful when creating managed pointers to stack&hyphen;allocated objects&period; Note that the non&hyphen;template class `ManagedPtrUtil` should be used in preference to this deprecated class, avoiding both template bloat and undefined behavior&period;
| xref:BloombergLP/bslma/ManagedPtrUtil.adoc[`ManagedPtrUtil`] 
| This utility class provides a general no&hyphen;op deleter, which is useful when creating managed pointers to stack&hyphen;allocated objects&period;
| xref:BloombergLP/bslma/ManagedPtr_DefaultDeleter.adoc[`ManagedPtr&lowbar;DefaultDeleter`] 
| This `struct` provides a function&hyphen;like managed pointer deleter that invokes `delete` with the passed pointer&period;
| xref:BloombergLP/bslma/ManagedPtr_FactoryDeleter.adoc[`ManagedPtr&lowbar;FactoryDeleter`] 
| This utility provides a general deleter for factories that provide a `deleteObject` operation (e&period;g&period;, `bslma&colon;&colon;Allocator`, `bdlma&colon;&colon;Pool`)&period;
| xref:BloombergLP/bslma/ManagedPtr_FactoryDeleterType.adoc[`ManagedPtr&lowbar;FactoryDeleterType`] 
| This metafunction class&hyphen;template provides a means to compute the preferred deleter function for a factory class for those methods of `ManagedPtr` that supply only a factory, and no additional deleter function&period; The intent is to use a common deleter function for all allocators that implement the `bslma&colon;&colon;Allocator` protocol, rather than create a special deleter function based on the complete type of each allocator, each doing the same thing (invoking the virtual function `deleteObject`)&period;
| xref:BloombergLP/bslma/ManagedPtr_Members.adoc[`ManagedPtr&lowbar;Members`] 
| This class provides a type&hyphen;agnostic container for managed pointer data members&period; This type exists so that a `ManagedPtr&lowbar;Ref` (see `bslma&lowbar;managedptr`) can point to the representation of a `ManagedPtr` even if the `ManagedPtr&lowbar;Ref` object is instantiated on a different type than the managed pointer type (e&period;g&period;, in the case of conversions or aliasing)&period; `ManagedPtr&lowbar;Members` also &quot;erases&quot; the type of each member, so that the same object code can be shared between all instantiations of the `ManagedPtr` class template, reducing template bloat&period; Note that objects of this type have an &quot;unset&quot; state, where the pointer member has a null value and the deleter member has an unspecified value&period;
| xref:BloombergLP/bslma/ManagedPtr_PairProxy.adoc[`ManagedPtr&lowbar;PairProxy`] 
| This class is a simple aggregate that may be used to construct a `bsl&colon;&colon;pair` object&period; It will be a POD if the (template parameter) `ASSOCIATED&lowbar;TYPE` is a POD&period; Note that the names of the data members must exactly match those of `bsl&colon;&colon;pair` to support users simply acting on the result of a function call from which a pair proxy is returned, and not assigning that result to a `bsl&colon;&colon;pair` first&period;
| xref:BloombergLP/bslma/ManagedPtr_Ref.adoc[`ManagedPtr&lowbar;Ref`] 
| This class holds a managed pointer reference, returned by the implicit conversion operator in the class `ManagedPtr`&period; This class is used to allow the construction of managed pointers from temporary managed pointer objects, since temporaries cannot bind to the reference to a modifiable object used in the copy constructor and copy&hyphen;assignment operator for `ManagedPtr`&period; Note that while no members or methods of this class template depend on the specified `TARGET&lowbar;TYPE`, it is important to carry this type into conversions to support passing ownership of `ManagedPtr&lowbar;Members` pointers when assigning or constructing `ManagedPtr` objects&period;
| xref:BloombergLP/bslma/ManagedPtr_TraitConstraint.adoc[`ManagedPtr&lowbar;TraitConstraint`] 
| This `struct` is an empty type that exists solely to enable constructor access to be constrained by type trait&period;
| xref:BloombergLP/bslma/MemoryResourceImpSupport.adoc[`MemoryResourceImpSupport`] 
| Namespace for functions that support implementing a memory resource&period;
| xref:BloombergLP/bslma/MemoryResourceImpSupport_AlignedData.adoc[`MemoryResourceImpSupport&lowbar;AlignedData`] 
| COMPONENT&hyphen;PRIVATE struct &hyphen;&hyphen; DO NOT USE&period; Maximally aligned `struct` holding an unsigned 64&hyphen;bit integer&period; This `struct` is exposed in the component header so that `MemoryResourceImpSupport&colon;&colon;singularPointer` can be implemented as `constexpr` and `inline`&period;
| xref:BloombergLP/bslma/NewDeleteAllocator.adoc[`NewDeleteAllocator`] 
| This class defines a concrete mechanism that adapts the system&hyphen;supplied (native) global `operator new` and `operator delete` to the `Allocator` protocol&period; The class method `singleton` returns a process&hyphen;wide unique object of this class whose lifetime is guaranteed to extend from the first call to `singleton` until the program terminates&period; A second class method, `allocator`, allows for conveniently replacing a &quot;null&quot; allocator with this singleton object&period; Note that this entire class should generally not be used directly by typical clients (see `bslma&lowbar;default` for more information)&period;
| xref:BloombergLP/bslma/PointerUtil.adoc[`PointerUtil`] 
| This `struct` provides a namespace for utility functions that perform low&hyphen;level pointer manipulations&period;
| xref:BloombergLP/bslma/RawDeleterGuard.adoc[`RawDeleterGuard`] 
| This class implements a guard that unconditionally deletes a managed object upon destruction by first invoking the object&apos;s destructor, and then invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; The managed object of parameterized `TYPE` must have been created using memory provided by this allocator (or pool), which must remain valid throughout the lifetime of the guard object&period;
| xref:BloombergLP/bslma/RawDeleterProctor.adoc[`RawDeleterProctor`] 
| This class implements a proctor that, unless its `release` method has previously been invoked, automatically deletes a managed object upon destruction by first invoking the object&apos;s destructor, and then invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; The managed object of parameterized `TYPE` must have been created using memory provided by this allocator (or pool), which must remain valid throughout the lifetime of the proctor object&period;
| xref:BloombergLP/bslma/SequentialAllocator.adoc[`SequentialAllocator`] 
| This class implements the `ManagedAllocator` protocol to provide a fast allocator of arbitrarily&hyphen;sized blocks of memory&period; Both the `release` method and the destructor atomically delete all memory managed by this allocator&semi; the `deallocate` method, however, has no effect for this class&period;
| xref:BloombergLP/bslma/SequentialPool.adoc[`SequentialPool`] 
| This class implements a memory pool that dispenses arbitrarily&hyphen;sized blocks of memory from an internal buffer or an optionally user&hyphen;supplied buffer&period; If an allocation request exceeds the remaining free memory space in the current buffer, the pool either replenishes its buffer with new memory to satisfy the request, or returns a separate memory block, depending on whether the request size exceeds an optionally specified maximum buffer size&period; By default, buffer growth is not capped&period; The `release` method releases all memory allocated through this pool, as does the destructor&period; Note, however, that individual allocated blocks of memory cannot be individually deallocated&period;
| xref:BloombergLP/bslma/SharedPtrInplaceRep.adoc[`SharedPtrInplaceRep`] 
| This class provides a concrete implementation of the `SharedPtrRep` protocol for &quot;in&hyphen;place&quot; instances of the parameterized `TYPE`&period; Upon destruction of this object, the destructor of `TYPE` is invoked&period;
| xref:BloombergLP/bslma/SharedPtrOutofplaceRep.adoc[`SharedPtrOutofplaceRep`] 
| This class provides a concrete implementation of the `SharedPtrRep` protocol for out&hyphen;of&hyphen;place instances of the parameterized `TYPE`&period; Upon destruction of this object, the parameterized `DELETER` type is invoked on the pointer to the shared object&period;
| xref:BloombergLP/bslma/SharedPtrOutofplaceRep_DeleterDiscriminator.adoc[`SharedPtrOutofplaceRep&lowbar;DeleterDiscriminator`] 
| This `class` provides two meta&hyphen;functions for determining the enumerated type and the C&plus;&plus; type of a deleter based on whether it is a pointer to a function, a pointer to a factory deleter, or an instance of a function&hyphen;like deleter&period;
| xref:BloombergLP/bslma/SharedPtrOutofplaceRep_DeleterHelper.adoc[`SharedPtrOutofplaceRep&lowbar;DeleterHelper`] 
| This `struct` provides utility functions to apply a deleter to a shared object referred to by `SharedPtrOutofplaceRep`&period;
| xref:BloombergLP/bslma/SharedPtrOutofplaceRep_DeleterType.adoc[`SharedPtrOutofplaceRep&lowbar;DeleterType`] 
| This `struct` enumerates four kinds of deleters, the first two are factory deleters, and the last two are function&hyphen;like deleters&period;
| xref:BloombergLP/bslma/SharedPtrOutofplaceRep_InitProctor.adoc[`SharedPtrOutofplaceRep&lowbar;InitProctor`] 
| This proctor is used for out&hyphen;of&hyphen;place shared pointer instantiations&period; Generally, a proctor is created prior to constructing a `SharedPtrOutofplaceRep` and released after successful construction&period; In the event that an exception is thrown during construction of the representation, the proctor will delete the provided pointer using the provided deleter&period; Note that the provided deleter is held by reference and must remain valid for the lifetime of the proctor&period; If the proctor is not released before it&apos;s destruction, a copy of the deleter is instantiated to delete the pointer (in case `operator()` is non&hyphen;`const`)&period; Also note that if the deleter throws during copy construction, the provided pointer will not be destroyed&period;
| xref:BloombergLP/bslma/SharedPtrRep.adoc[`SharedPtrRep`] 
| This class provides a partially implemented shared pointer representation (&quot;letter&quot;) protocol&period; The class provides two counters for storing the number of shared and weak references, and functions to increment and decrement these counters&period; In addition, this class provides protocol methods that allow concrete implementations to specify what action should be taken when these counts reach zero&period; The function `disposeRep` is responsible for destroying this object, it is called when the reference count to this object reaches zero&period; Thus, the destructor of this object is declared as protected and should never be invoked&period;
| xref:BloombergLP/bslma/StdTestAllocator.adoc[`StdTestAllocator`] 
| An STL&hyphen;compatible test allocator that forwards allocation calls to an underlying mechanism object of a type derived from `bslma&colon;&colon;TestAllocator`&period; This class template adheres to the allocator requirements defined in section 20&period;1&period;5 &lsqb;lib&period;allocator&period;requirements&rsqb;of the C&plus;&plus; standard and may be used to instantiate any &lsqb;container&rsqb;class template that follows the STL allocator protocol&period; The allocation mechanism is chosen at run&hyphen;time, giving the programmer run&hyphen;time control over how a container allocates and frees memory&period;
| xref:BloombergLP/bslma/SuppressesImplicitConvertibilityWarnings.adoc[`SuppressesImplicitConvertibilityWarnings`] 
| This `struct` template implements a meta&hyphen;function to determine whether a deprecation warning emitted for allocator&hyphen;aware types that have an implicit conversion constructor from `Allocator&ast;`, should be suppressed for (template parameter) `t&lowbar;TYPE`&period; This `struct` derives from `bsl&colon;&colon;true&lowbar;type` if the warning should be suppressed and from `bsl&colon;&colon;false&lowbar;type` otherwise&period; Note that this meta&hyphen;function is used for testing to disable the warnings generated by this component when deliberately testing the deprecated feature&period;
| xref:BloombergLP/bslma/TestAllocator.adoc[`TestAllocator`] 
| This class defines a concrete &quot;test&quot; allocator mechanism that implements the `Allocator` protocol, and provides instrumentation to track (1) the number of blocks&sol;bytes currently in use, (2) the maximum number of blocks&sol;bytes that have been outstanding at any one time, and (3) the cumulative number of blocks&sol;bytes that have ever been allocated by this test allocator object&period; The accumulated statistics are based solely on the number of bytes requested&period; Additional testing facilities include allocation limits, verbosity modes, status, and automated report printing&period;
| xref:BloombergLP/bslma/TestAllocatorException.adoc[`TestAllocatorException`] 
| This class defines an exception object for memory allocation operations&period; Objects of this class contain information about an allocation request&period;
| xref:BloombergLP/bslma/TestAllocatorMonitor.adoc[`TestAllocatorMonitor`] 
| This mechanism provides a set of boolean accessor methods indicating whether a change has occurred in the state of the `TestAllocator` object (supplied at construction) since the construction of the monitor&period; See the  section for the statics tracked&period;
| xref:BloombergLP/bslma/TestAllocatorStashedStatistics.adoc[`TestAllocatorStashedStatistics`] 
| This simple unconstrained attribute type is used to store all information necessary to restore the state of all statistics of a `TestAllocator` after a `stashStatistics()` call that resets them&period; See also `TestAllocator&colon;&colon;stashStatistics` and `TestAllocator&colon;&colon;restoreStatistics`&period;
| xref:BloombergLP/bslma/TestAllocatorStatisticsGuard.adoc[`TestAllocatorStatisticsGuard`] 
| This mechanism provides the means to get localized `TestAllocator` statistics in a scope since the construction of the guard, and also reinstates the statistics upon its destruction as if the local reset has not happened&period; See the  section for the statistics managed&period;
| xref:BloombergLP/bslma/TestAllocator_BlockHeader.adoc[`TestAllocator&lowbar;BlockHeader`] 
| Private header for a block of allocated memory managed by `TestAllocator`&period;
| xref:BloombergLP/bslma/TestAllocator_Proxy.adoc[`TestAllocator&lowbar;Proxy`] 
| This class provides a proxy to the test allocator that is supplied to the `BSLMA&lowbar;TESTALLOCATOR&lowbar;EXCEPTION&lowbar;TEST&lowbar;BEGIN` macro&period; This proxy may be instantiated with `TestAllocator`, or with a type that supports the same interface as `TestAllocator`&period;
| xref:BloombergLP/bslma/TestAllocator_ProxyBase.adoc[`TestAllocator&lowbar;ProxyBase`] 
| This class provides a common base class for the parameterized `TestAllocator&lowbar;Proxy` class (below)&period; Note that the `virtual` `setAllocationLimit` method, although a &quot;setter&quot;, _must_ be declared `const`&period;
| xref:BloombergLP/bslma/UsesBslmaAllocator-020.adoc[`UsesBslmaAllocator`] 
| This metafunction is derived from `true&lowbar;type` if `TYPE` adheres to the `bslma` allocator usage idiom and `false&lowbar;type` otherwise&period; Note that this trait must be explicitly associated with a type in order for this metafunction to return true&semi; simply having a constructor that implicitly converts `bslma&colon;&colon;Allocator &ast;` to `TYPE` is deprecated as a means of indicating that a type follows the `bslma` allocator usage idiom&period;
| xref:BloombergLP/bslma/UsesBslmaAllocator_DeprecatedIf-0f.adoc[`UsesBslmaAllocator&lowbar;DeprecatedIf`] 
| For compilers that support a deprecation annotation, this empty `struct` has a static `check` function that yields a deprecation warning when called (including within an unevaluated context) if this class is instantiated with a `true` argument, but not if instantiated with a `false` argument&period;
| xref:BloombergLP/bslma/UsesBslmaAllocator_Sniff-0d.adoc[`UsesBslmaAllocator&lowbar;Sniff`] 
| This class has a constant `value` that is `true` if the specified `TYPE` is implicitly convertible from `bslma&colon;&colon;Allocator &ast;`&period; It thus &quot;sniffs&quot; whether `UsesBslmaAllocator&lt;TYPE&gt;&colon;&colon;value` should be `true`&period; If the specified `BYPASS` parameter is `true`, the conversion check is skipped and `value` is hard&hyphen;coded to `true`&period; The bypass is needed because the xlC compiler will sometimes instantiate the copy constructor for `TYPE`, leading to compilation errors if `TYPE` is not copy constructible&period; This automatic sniffing is deprecated&semi; having a type implicitly convertible from an allocator pointer is discouraged&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/AllocatorAdaptor.adoc[`AllocatorAdaptor`] 
| Polymorphic wrapper around an STL&hyphen;style allocator&period; Note that `AllocatorAdaptor[&colon;&colon;Type]` is the same type regardless of whether or not the compiler supports alias templates&period; It should be used, therefore, whenever the exact type of the adaptor is important&period;
|===


== Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/TestAllocator_getProxy.adoc[`TestAllocator&lowbar;getProxy`] 
| Return, by value, a test allocator proxy for the specified parameterized `allocator`&period;
| xref:BloombergLP/bslma/swap.adoc[`swap`] 
| Efficiently exchange the values of the specified `a` and `b` objects&period; This function provides the no&hyphen;throw exception&hyphen;safety guarantee&period;
| xref:BloombergLP/bslma/operator_lshift.adoc[`operator&lt;&lt;`] 
| Write the accumulated state information held in the specified allocator `ta` to the specified `stream` in a reasonable (multi&hyphen;line) format identical to the format produced by `ta&period;print()` and return a reference offering modifiable access to `stream`&period; Output is performed via calls to `stream&period;write(s, count)`, where `write` is a required method of class `t&lowbar;OS`, `s` is a `const char&ast;` holding the formatted output, and `count` is the length of `s` excluding any null terminator&period; Note that `std&colon;&colon;ostream` meets the requirements for `t&lowbar;OS`&period;
| xref:BloombergLP/bslma/operator_eq-03.adoc[`operator&equals;&equals;`] 
| Equality operators
| xref:BloombergLP/bslma/operator_not_eq-09.adoc[`operator!&equals;`] 
| Inequality operators
|===


== Variables

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/IsStdAllocator_v.adoc[`IsStdAllocator&lowbar;v`] 
| This template variable represents the result value of the `bslma&colon;&colon;IsStdAllocator` meta&hyphen;function&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
