Public Attributes | List of all members
rmm::mr::detail::stream_ordered_memory_resource< PoolResource, FreeListType >::split_block Struct Reference

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.
 

Detailed Description

template<typename PoolResource, typename FreeListType>
struct rmm::mr::detail::stream_ordered_memory_resource< PoolResource, FreeListType >::split_block

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.

Returns
size_t The maximum size of a single allocation supported by this memory resource

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.

Parameters
sizeThe minimum size block to return
blocksThe free list into which to optionally insert new blocks
streamThe stream on which the memory is to be used.
Returns
block_type a block of at least size bytes Struct representing a block that has been split for allocation

The documentation for this struct was generated from the following file: