[#BloombergLP-bdlma] = xref:BloombergLP.adoc[BloombergLP]::bdlma :relfileprefix: ../ :mrdocs: Namespace for managed allocator components. == 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. If the requested memory cannot be returned, the contract requires that an `std::bad_alloc` exception be thrown. | xref:BloombergLP/bdlma/AligningAllocator.adoc[`AligningAllocator`] | This `class` provides a mechanism that serves as a wrapper around another allocator, passed at construction. The mechanism guarantees that all allocations passed to the underlying allocator will be aligned by the alignment specified at construction. | 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's `release` method is invoked. | xref:BloombergLP/bdlma/BlockList.adoc[`BlockList`] | This class implements a low‐level memory manager that allocates and manages a sequence of memory blocks ‐‐ each potentially of a different size as specified during the invocation of the `allocate` method. Allocated blocks may be efficiently deallocated individually, i.e., potentially in constant time depending on the supplied allocator. The `release` method deallocates the entire sequence of memory blocks, as does the destructor. | xref:BloombergLP/bdlma/BufferImpUtil.adoc[`BufferImpUtil`] | This `struct` provides a namespace for a suite of pure procedures for allocating memory from a buffer. | xref:BloombergLP/bdlma/BufferManager.adoc[`BufferManager`] | This class implements a buffer manager that dispenses heterogeneous blocks of memory (of varying, user‐specified sizes) from an external buffer whose address and size are optionally supplied at construction. 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. Note that in no event will the buffer manager attempt to deallocate the external buffer. | 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‐specified sizes) from an external buffer whose address and size (in bytes) are supplied at construction. 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; if no allocator is supplied, the currently installed default allocator is used. This class is _exception_ _neutral_: If memory cannot be allocated, the behavior is defined by the (optional) allocator supplied at construction. Note that in no case will the buffered sequential allocator attempt to deallocate the external buffer. | xref:BloombergLP/bdlma/BufferedSequentialPool.adoc[`BufferedSequentialPool`] | Fast memory pool dispensing blocks from an external buffer. | xref:BloombergLP/bdlma/ConcurrentAllocatorAdapter.adoc[`ConcurrentAllocatorAdapter`] | This class defines an implementation of the `bslma::Allocator` protocol that "decorates" (wraps) a concrete `bslma::Allocator` to ensure thread‐safe access to the decorated allocator. | 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. | xref:BloombergLP/bdlma/ConcurrentFixedPool_Node.adoc[`ConcurrentFixedPool_Node`] | The component‐private `struct` provides a header for blocks that are allocated from `ConcurrentFixedPool` objects. | xref:BloombergLP/bdlma/ConcurrentMultipool.adoc[`ConcurrentMultipool`] | This class implements a memory manager that maintains a configurable number of `bdlma::Pool` objects, each dispensing memory blocks of a unique size. The `Pool` objects are placed in an array, with each successive pool managing memory blocks of size twice that of the previous pool. 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. Both the `release` method and the destructor of a `bdema::Multipool` release all memory currently allocated via the object. | xref:BloombergLP/bdlma/ConcurrentMultipoolAllocator.adoc[`ConcurrentMultipoolAllocator`] | This class implements the `bdlma::ManagedAllocator` protocol to provide a thread‐safe allocator that maintains a configurable number of `Pool` objects, each dispensing memory blocks of a unique size. The `Pool` objects are placed in an array, with each successive pool managing memory blocks of size twice that of the previous pool. 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. Both the `release` method and the destructor of a `ConcurrentMultipoolAllocator` release all memory currently allocated via the object. | 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. This memory pool maintains an internal linked list of free memory blocks, and dispenses one block for each `allocate` method invocation. When a memory block is deallocated, it is returned to the free list for potential reuse. | xref:BloombergLP/bdlma/ConcurrentPoolAllocator.adoc[`ConcurrentPoolAllocator`] | This class implements the `bslma::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. This allocator maintains an internal linked list of free memory blocks, and dispenses one block for each `allocate` method invocation. When a memory block is deallocated, it is returned to the free list for potential reuse. | xref:BloombergLP/bdlma/CountingAllocator.adoc[`CountingAllocator`] | This class defines a concrete "counting" allocator mechanism that implements the `bslma::Allocator` protocol, and provides instrumentation to track: (1) the number of bytes currently in use, and (2) the cumulative number of bytes that have ever been allocated. The accumulated statistics are based solely on the number of bytes requested (see `allocate`). | xref:BloombergLP/bdlma/DefaultDeleter.adoc[`DefaultDeleter`] | This `class` provides a default concrete implementation of the `Deleter` protocol. Instances of `DefaultDeleter<TYPE>` either use an allocator optionally supplied at construction, or the currently installed default allocator if an allocator is not provided. | xref:BloombergLP/bdlma/Deleter.adoc[`Deleter`] | Provide a protocol (or pure interface) for a thread‐safe object deleter. | xref:BloombergLP/bdlma/Factory.adoc[`Factory`] | This `class` provides a protocol (or pure interface) for a thread‐safe object creator and deleter. It extends the `Deleter` protocol with the addition of a `createObject` method. | xref:BloombergLP/bdlma/GuardingAllocator.adoc[`GuardingAllocator`] | This class defines a concrete thread‐safe "guarding" allocator mechanism that implements the `bslma::Allocator` protocol, and adjoins a read/write protected guard page to each block of memory returned by the `allocate` method. 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. Note that, unlike many other allocators, an allocator cannot be (optionally) supplied at construction; instead, a system facility is used that allocates blocks of memory in multiples of the system page size. Also note that this allocator is intended for debugging purposes _only_. | 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. 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. Thread‐safe. | xref:BloombergLP/bdlma/InfrequentDeleteBlockList.adoc[`InfrequentDeleteBlockList`] | This class implements a low‐level memory manager that allocates and manages a sequence of memory blocks ‐‐ each potentially of a different size as specified during the invocation of the `allocate` method. The `release` method deallocates the entire sequence of memory blocks, as does the destructor. Note that memory blocks cannot be deallocated individually. | xref:BloombergLP/bdlma/LocalBufferedObject.adoc[`LocalBufferedObject`] | This `class` contains an object of type `t_TYPE` and a local sequential allocator with an arena size of `t_BUFFER_SIZE`, from which the `t_TYPE` object allocates memory, in a single object. The `t_DISABLE_DESTRUCTION` template parameter can be used to prevent this `class` from calling `~t_TYPE()` in cases where it is known that `t_TYPE` manages no resources other than memory, since the memory will be adequately managed by the local sequential allocator. | 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‐specified sizes) from a local buffer whose capacity is the specified `t_SIZE` (in bytes). 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; if no allocator is supplied, the currently installed default allocator is used. This class is _exception_ _neutral_; if memory cannot be allocated, the behavior is defined by the (optional) allocator supplied at construction. | xref:BloombergLP/bdlma/ManagedAllocator.adoc[`ManagedAllocator`] | This protocol class extends `bslma::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. | xref:BloombergLP/bdlma/MemoryBlockDescriptor.adoc[`MemoryBlockDescriptor`] | This is an in‐core value‐semantic class describing the size and address of a block of memory. A null block descriptor is defined as a descriptor having an address and size of 0. The behavior is undefined for a descriptor whose address is 0, but whose size if not also 0. | xref:BloombergLP/bdlma/Multipool.adoc[`Multipool`] | This class implements a memory manager that maintains a configurable number of `bdlma::Pool` objects, each dispensing memory blocks of a unique size. The `bdlma::Pool` objects are placed in an array, with each successive pool managing memory blocks of size twice that of the previous pool. 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. Both the `release` method and the destructor of a `bdlma::Multipool` release all memory currently allocated via the object. | xref:BloombergLP/bdlma/MultipoolAllocator.adoc[`MultipoolAllocator`] | This class implements the `bdlma::ManagedAllocator` protocol to provide an allocator that maintains a configurable number of `bdlma::Pool` objects, each dispensing memory blocks of a unique size. The `bdlma::Pool` objects are placed in an array, with each successive pool managing memory blocks of size twice that of the previous pool. 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. Both the `release` method and the destructor of a `bdlma::MultipoolAllocator` release all memory currently allocated via the object. | 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. This memory pool maintains an internal linked list of free memory blocks, and dispenses one block for each `allocate` method invocation. When a memory block is deallocated, it is returned to the free list for potential reuse. | 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‐specified sizes) from a sequence of dynamically‐allocated buffers. Memory for the internal buffers is supplied by an (optional) allocator supplied at construction; if no allocator is supplied, the currently installed default allocator is used. 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. This class is _exception_ _neutral_: If memory cannot be allocated, the behavior is defined by the (optional) allocator specified at construction. | xref:BloombergLP/bdlma/SequentialPool.adoc[`SequentialPool`] | This class implements a fast memory pool that efficiently dispenses heterogeneous blocks of memory (of varying, user‐specified sizes) from a sequence of dynamically‐allocated internal buffers. Memory for the internal buffers is supplied by an (optional) allocator supplied at construction; if no allocator is supplied, the currently installed default allocator is used. 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. This class is _exception_ _neutral_: If memory cannot be allocated, the behavior is defined by the (optional) allocator specified at construction. |=== == Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlma/operator_eq.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` memory block descriptors have the same value and `false` otherwise. Two descriptors have the same value if and only if they have the same address and size. | xref:BloombergLP/bdlma/operator_not_eq.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` memory block descriptors do not have the same value and `false` otherwise. Two descriptors differ in value if they differ in either their address or size. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#