BloombergLP::bdlma::InfrequentDeleteBlockList

Low-level memory manager that allocates and manages a sequence of memory blocks.

Synopsis

Declared in <bdlma_infrequentdeleteblocklist.h>

class InfrequentDeleteBlockList;

Description

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.

Member Functions

NameDescription
InfrequentDeleteBlockList [constructor]Create an empty block list for managing memory blocks of varying sizes.
~InfrequentDeleteBlockList [destructor]Destroy this object and deallocate all outstanding memory blocks managed by this object.
allocate Return the address of a contiguous block of memory of the specified size.
allocator Return the allocator used by this object to supply memory.
deallocate This method has no effect on the memory block at the specified address.
release Deallocate all memory blocks managed by this object, returning this object to its default-constructed state.
releaseAllButLastBlock Deallocate all except the most-recently obtained block of the memory blocks managed by this object. If no blocks are managed, this method has no effect.