Create a sequential allocator using an internal buffer.
Declared in <bslma_sequentialallocator.h>
explicit
SequentialAllocator(Allocator* basicAllocator = 0);
Create a sequential allocator for allocating memory blocks from an internal buffer. Optionally specify an alignment strategy used to align allocated memory blocks. If strategy is not specified, Natural Alignment is used. Optionally specify an initialSize the absolute value of which indicates the initial size (in bytes) for the internal buffer. If initialSize is not specified, an implementation-defined value is used. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. If an allocate or reserveCapacity request cannot be satisfied from the current buffer, a new buffer is allocated, the size of which is determined by a buffer growth strategy implied by initialSize. If initialSize was specified and is negative, or if it was not specified, the buffer growth strategy used is Geometric Growth; otherwise it is Constant Growth. (See the component level documentation for further details.) In either case, the new buffer will have sufficient capacity to satisfy the request. If *Geometric Growth* is in effect, no limit is imposed on the size of buffers.
| Name | Description |
|---|---|
| basicAllocator | The allocator used to supply memory. |