Fast allocator that dispenses heterogeneous blocks from a local buffer.
Synopsis
Declared in <bdlma_localsequentialallocator.h>
template<int t_SIZE>
class LocalSequentialAllocator
: public BufferedSequentialAllocator
Description
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.
Base Classes
Name |
Description |
Fast allocator that dispenses heterogeneous blocks from an external buffer. |
Type Aliases
Name |
Description |
Alias for an unsigned integral type capable of representing the number of bytes in this platform's virtual address space. |
Member Functions
Name |
Description |
|
Create a local sequential allocator using an internal buffer of |
Return a block of memory of the specified |
|
Return the allocator passed at construction. |
|
This method has no effect on the specified memory block. |
|
|
|
|
|
|
Release all memory allocated through this allocator except the external buffer supplied at construction. |
|
Release allocated memory while retaining this allocator's typical internal buffers. |
Static Member Functions
Name |
Description |
Throw |
Protected Member Functions
Name |
Description |
|
Return a newly allocated block of at least |
|
Return the memory block at |
|
Return whether this allocator can exchange memory with |
Created with MrDocs