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

Namespace for managed allocator components&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlma/AlignedAllocator.adoc[`AlignedAllocator`] 
| This protocol provides a pure abstract interface and contract for clients and suppliers of raw aligned memory&period; If the requested memory cannot be returned, the contract requires that an `std&colon;&colon;bad&lowbar;alloc` exception be thrown&period;
| xref:BloombergLP/bdlma/AligningAllocator.adoc[`AligningAllocator`] 
| This `class` provides a mechanism that serves as a wrapper around another allocator, passed at construction&period; The mechanism guarantees that all allocations passed to the underlying allocator will be aligned by the alignment specified at construction&period;
| xref:BloombergLP/bdlma/AutoReleaser.adoc[`AutoReleaser`] 
| This class implements a proctor that invokes the `release` method of its managed allocator or pool at destruction unless the proctor&apos;s `release` method is invoked&period;
| xref:BloombergLP/bdlma/BlockList.adoc[`BlockList`] 
| This class implements a low&hyphen;level memory manager that allocates and manages a sequence of memory blocks &hyphen;&hyphen; each potentially of a different size as specified during the invocation of the `allocate` method&period; Allocated blocks may be efficiently deallocated individually, i&period;e&period;, potentially in constant time depending on the supplied allocator&period; The `release` method deallocates the entire sequence of memory blocks, as does the destructor&period;
| xref:BloombergLP/bdlma/BufferImpUtil.adoc[`BufferImpUtil`] 
| This `struct` provides a namespace for a suite of pure procedures for allocating memory from a buffer&period;
| xref:BloombergLP/bdlma/BufferManager.adoc[`BufferManager`] 
| This class implements a buffer manager that dispenses heterogeneous blocks of memory (of varying, user&hyphen;specified sizes) from an external buffer whose address and size are optionally supplied at construction&period; If an allocation request exceeds the remaining free memory space in the external buffer, the allocation request returns 0 if `allocate` is used, or results in undefined behavior if `allocateRaw` is used&period; Note that in no event will the buffer manager attempt to deallocate the external buffer&period;
| xref:BloombergLP/bdlma/BufferedSequentialAllocator.adoc[`BufferedSequentialAllocator`] 
| This class implements the `ManagedAllocator` protocol to provide a fast allocator that dispenses heterogeneous blocks of memory (of varying, user&hyphen;specified sizes) from an external buffer whose address and size (in bytes) are supplied at construction&period; If an allocation request exceeds the remaining free memory space in the external buffer, memory will be supplied by an (optional) allocator also supplied at construction&semi; if no allocator is supplied, the currently installed default allocator is used&period; This class is _exception_ _neutral_&colon; If memory cannot be allocated, the behavior is defined by the (optional) allocator supplied at construction&period; Note that in no case will the buffered sequential allocator attempt to deallocate the external buffer&period;
| xref:BloombergLP/bdlma/BufferedSequentialPool.adoc[`BufferedSequentialPool`] 
| Fast memory pool dispensing blocks from an external buffer&period;
| xref:BloombergLP/bdlma/ConcurrentAllocatorAdapter.adoc[`ConcurrentAllocatorAdapter`] 
| This class defines an implementation of the `bslma&colon;&colon;Allocator` protocol that &quot;decorates&quot; (wraps) a concrete `bslma&colon;&colon;Allocator` to ensure thread&hyphen;safe access to the decorated allocator&period;
| xref:BloombergLP/bdlma/ConcurrentFixedPool.adoc[`ConcurrentFixedPool`] 
| This class implements a memory pool that allocates and manages up to a fixed number of memory blocks of some uniform size, with both the limit on the number of blocks and the block size specified at construction&period;
| xref:BloombergLP/bdlma/ConcurrentFixedPool_Node.adoc[`ConcurrentFixedPool&lowbar;Node`] 
| The component&hyphen;private `struct` provides a header for blocks that are allocated from `ConcurrentFixedPool` objects&period;
| xref:BloombergLP/bdlma/ConcurrentMultipool.adoc[`ConcurrentMultipool`] 
| This class implements a memory manager that maintains a configurable number of `bdlma&colon;&colon;Pool` objects, each dispensing memory blocks of a unique size&period; The `Pool` objects are placed in an array, with each successive pool managing memory blocks of size twice that of the previous pool&period; Each multipool allocation (deallocation) request allocates memory from (returns memory to) the internal pool having the smallest block size not less than the requested size, or, if no pool manages memory blocks of sufficient sized, from a separately managed list of memory blocks&period; Both the `release` method and the destructor of a `bdema&colon;&colon;Multipool` release all memory currently allocated via the object&period;
| xref:BloombergLP/bdlma/ConcurrentMultipoolAllocator.adoc[`ConcurrentMultipoolAllocator`] 
| This class implements the `bdlma&colon;&colon;ManagedAllocator` protocol to provide a thread&hyphen;safe allocator that maintains a configurable number of `Pool` objects, each dispensing memory blocks of a unique size&period; The `Pool` objects are placed in an array, with each successive pool managing memory blocks of size twice that of the previous pool&period; Each multipool allocation (deallocation) request allocates memory from (returns memory to) the internal pool having the smallest block size not less than the requested size, or, if no pool manages memory blocks of sufficient sized, from a separately managed list of memory blocks&period; Both the `release` method and the destructor of a `ConcurrentMultipoolAllocator` release all memory currently allocated via the object&period;
| xref:BloombergLP/bdlma/ConcurrentPool.adoc[`ConcurrentPool`] 
| This class implements a memory pool that allocates and manages memory blocks of some uniform size specified at construction&period; This memory pool maintains an internal linked list of free memory blocks, and dispenses one block for each `allocate` method invocation&period; When a memory block is deallocated, it is returned to the free list for potential reuse&period;
| xref:BloombergLP/bdlma/ConcurrentPoolAllocator.adoc[`ConcurrentPoolAllocator`] 
| This class implements the `bslma&colon;&colon;Allocator` protocol to provide an allocator that manages pooled memory blocks of some uniform size, specified either at construction, or at the first invocation of the `allocate` method&period; This allocator maintains an internal linked list of free memory blocks, and dispenses one block for each `allocate` method invocation&period; When a memory block is deallocated, it is returned to the free list for potential reuse&period;
| xref:BloombergLP/bdlma/CountingAllocator.adoc[`CountingAllocator`] 
| This class defines a concrete &quot;counting&quot; allocator mechanism that implements the `bslma&colon;&colon;Allocator` protocol, and provides instrumentation to track&colon; (1) the number of bytes currently in use, and (2) the cumulative number of bytes that have ever been allocated&period; The accumulated statistics are based solely on the number of bytes requested (see `allocate`)&period;
| xref:BloombergLP/bdlma/DefaultDeleter.adoc[`DefaultDeleter`] 
| This `class` provides a default concrete implementation of the `Deleter` protocol&period; Instances of `DefaultDeleter&lt;TYPE&gt;` either use an allocator optionally supplied at construction, or the currently installed default allocator if an allocator is not provided&period;
| xref:BloombergLP/bdlma/Deleter.adoc[`Deleter`] 
| Provide a protocol (or pure interface) for a thread&hyphen;safe object deleter&period;
| xref:BloombergLP/bdlma/Factory.adoc[`Factory`] 
| This `class` provides a protocol (or pure interface) for a thread&hyphen;safe object creator and deleter&period; It extends the `Deleter` protocol with the addition of a `createObject` method&period;
| xref:BloombergLP/bdlma/GuardingAllocator.adoc[`GuardingAllocator`] 
| This class defines a concrete thread&hyphen;safe &quot;guarding&quot; allocator mechanism that implements the `bslma&colon;&colon;Allocator` protocol, and adjoins a read&sol;write protected guard page to each block of memory returned by the `allocate` method&period; The guard page is placed immediately before or immediately following the block returned from `allocate` according to the `GuardPageLocation` enumerator value (optionally) supplied at construction&period; Note that, unlike many other allocators, an allocator cannot be (optionally) supplied at construction&semi; instead, a system facility is used that allocates blocks of memory in multiples of the system page size&period; Also note that this allocator is intended for debugging purposes _only_&period;
| xref:BloombergLP/bdlma/HeapBypassAllocator.adoc[`HeapBypassAllocator`] 
| This class allows the caller to allocate memory directly from virtual memory, without going through the heap like `malloc` or `new` would&period; Note that the only way to free any memory allocated with this object is to destroy the object, at which point all memory it has allocated is freed&period; Thread&hyphen;safe&period;
| xref:BloombergLP/bdlma/InfrequentDeleteBlockList.adoc[`InfrequentDeleteBlockList`] 
| This class implements a low&hyphen;level memory manager that allocates and manages a sequence of memory blocks &hyphen;&hyphen; each potentially of a different size as specified during the invocation of the `allocate` method&period; The `release` method deallocates the entire sequence of memory blocks, as does the destructor&period; Note that memory blocks cannot be deallocated individually&period;
| xref:BloombergLP/bdlma/LocalBufferedObject.adoc[`LocalBufferedObject`] 
| This `class` contains an object of type `t&lowbar;TYPE` and a local sequential allocator with an arena size of `t&lowbar;BUFFER&lowbar;SIZE`, from which the `t&lowbar;TYPE` object allocates memory, in a single object&period; The `t&lowbar;DISABLE&lowbar;DESTRUCTION` template parameter can be used to prevent this `class` from calling `&#126;t&lowbar;TYPE()` in cases where it is known that `t&lowbar;TYPE` manages no resources other than memory, since the memory will be adequately managed by the local sequential allocator&period;
| xref:BloombergLP/bdlma/LocalSequentialAllocator.adoc[`LocalSequentialAllocator`] 
| This class implements the `ManagedAllocator` protocol to provide a fast allocator that dispenses heterogeneous blocks of memory (of varying, user&hyphen;specified sizes) from a local buffer whose capacity is the specified `t&lowbar;SIZE` (in bytes)&period; If an allocation request exceeds the remaining free memory space in the local buffer, memory will be supplied by an (optional) allocator supplied at construction&semi; if no allocator is supplied, the currently installed default allocator is used&period; This class is _exception_ _neutral_&semi; if memory cannot be allocated, the behavior is defined by the (optional) allocator supplied at construction&period;
| xref:BloombergLP/bdlma/ManagedAllocator.adoc[`ManagedAllocator`] 
| This protocol class extends `bslma&colon;&colon;Allocator` 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/bdlma/MemoryBlockDescriptor.adoc[`MemoryBlockDescriptor`] 
| This is an in&hyphen;core value&hyphen;semantic class describing the size and address of a block of memory&period; A null block descriptor is defined as a descriptor having an address and size of 0&period; The behavior is undefined for a descriptor whose address is 0, but whose size if not also 0&period;
| xref:BloombergLP/bdlma/Multipool.adoc[`Multipool`] 
| This class implements a memory manager that maintains a configurable number of `bdlma&colon;&colon;Pool` objects, each dispensing memory blocks of a unique size&period; The `bdlma&colon;&colon;Pool` objects are placed in an array, with each successive pool managing memory blocks of size twice that of the previous pool&period; Each multipool allocation (deallocation) request allocates memory from (returns memory to) the internal pool having the smallest block size not less than the requested size, or, if no pool manages memory blocks of sufficient size, from a separately managed list of memory blocks&period; Both the `release` method and the destructor of a `bdlma&colon;&colon;Multipool` release all memory currently allocated via the object&period;
| xref:BloombergLP/bdlma/MultipoolAllocator.adoc[`MultipoolAllocator`] 
| This class implements the `bdlma&colon;&colon;ManagedAllocator` protocol to provide an allocator that maintains a configurable number of `bdlma&colon;&colon;Pool` objects, each dispensing memory blocks of a unique size&period; The `bdlma&colon;&colon;Pool` objects are placed in an array, with each successive pool managing memory blocks of size twice that of the previous pool&period; Each multipool allocation (deallocation) request allocates memory from (returns memory to) the internal pool having the smallest block size not less than the requested size, or, if no pool manages memory blocks of sufficient sized, from a separately managed list of memory blocks&period; Both the `release` method and the destructor of a `bdlma&colon;&colon;MultipoolAllocator` release all memory currently allocated via the object&period;
| xref:BloombergLP/bdlma/Pool.adoc[`Pool`] 
| This class implements a memory pool that allocates and manages memory blocks of some uniform size specified at construction&period; This memory pool maintains an internal linked list of free memory blocks, and dispenses one block for each `allocate` method invocation&period; When a memory block is deallocated, it is returned to the free list for potential reuse&period;
| xref:BloombergLP/bdlma/SequentialAllocator.adoc[`SequentialAllocator`] 
| This class implements the `ManagedAllocator` protocol to provide a fast allocator that dispenses heterogeneous blocks of memory (of varying, user&hyphen;specified sizes) from a sequence of dynamically&hyphen;allocated buffers&period; Memory for the internal buffers is supplied by an (optional) allocator supplied at construction&semi; if no allocator is supplied, the currently installed default allocator is used&period; If an allocation exceeds the remaining free memory space in the current buffer, the allocator replenishes its internal buffer with new memory to satisfy the request&period; This class is _exception_ _neutral_&colon; If memory cannot be allocated, the behavior is defined by the (optional) allocator specified at construction&period;
| xref:BloombergLP/bdlma/SequentialPool.adoc[`SequentialPool`] 
| This class implements a fast memory pool that efficiently dispenses heterogeneous blocks of memory (of varying, user&hyphen;specified sizes) from a sequence of dynamically&hyphen;allocated internal buffers&period; Memory for the internal buffers is supplied by an (optional) allocator supplied at construction&semi; if no allocator is supplied, the currently installed default allocator is used&period; If an allocation exceeds the remaining free memory space in the current buffer, the pool replenishes its internal buffer with new memory to satisfy the request&period; This class is _exception_ _neutral_&colon; If memory cannot be allocated, the behavior is defined by the (optional) allocator specified at construction&period;
|===


== Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlma/operator_eq.adoc[`operator&equals;&equals;`] 
| Return `true` if the specified `lhs` and `rhs` memory block descriptors have the same value and `false` otherwise&period; Two descriptors have the same value if and only if they have the same address and size&period;
| xref:BloombergLP/bdlma/operator_not_eq.adoc[`operator!&equals;`] 
| Return `true` if the specified `lhs` and `rhs` memory block descriptors do not have the same value and `false` otherwise&period; Two descriptors differ in value if they differ in either their address or size&period;
|===



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