Get the maximum size of a single allocation supported by this suballocator memory resource. More...
#include <stream_ordered_memory_resource.hpp>
Public Attributes | |
void * | allocated_pointer |
The pointer allocated from a block. | |
block_type | remainder |
The remainder of the block from which the pointer was allocated. | |
Get the maximum size of a single allocation supported by this suballocator memory resource.
Default implementation is the maximum size_t
value, but fixed-size allocators will have a lower limit. Override this function in derived classes as necessary.
Allocate space (typically from upstream) to supply the suballocation pool and return a sufficiently sized block.
This function returns a block because in some suballocators, a single block is allocated from upstream and returned. In other suballocators, many blocks are created from upstream. In the latter case, the function returns one block and inserts all the rest into the free list blocks
.
size | The minimum size block to return |
blocks | The free list into which to optionally insert new blocks |
stream | The stream on which the memory is to be used. |
size
bytes Struct representing a block that has been split for allocation