vecmem 1.18.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vecmem::arena_memory_resource Class Referencefinal

Memory resource implementing an arena allocation scheme. More...

#include <vecmem/memory/arena_memory_resource.hpp>

Inheritance diagram for vecmem::arena_memory_resource:
vecmem::details::memory_resource_base

Public Member Functions

VECMEM_CORE_EXPORT arena_memory_resource (memory_resource &upstream, std::size_t initial_size, std::size_t maximum_size)
 Construct the memory resource on top of an upstream memory resource.
 
VECMEM_CORE_EXPORT arena_memory_resource (arena_memory_resource &&parent) noexcept
 Move constructor.
 
 arena_memory_resource (const arena_memory_resource &)=delete
 Disallow copying the memory resource.
 
VECMEM_CORE_EXPORT ~arena_memory_resource () override
 Destructor.
 
VECMEM_CORE_EXPORT arena_memory_resourceoperator= (arena_memory_resource &&rhs) noexcept
 Move assignment operator.
 
arena_memory_resourceoperator= (const arena_memory_resource &)=delete
 Disallow copying the memory resource.
 

Protected Member Functions

Function(s) implementing @c vecmem::memory_resource
VECMEM_CORE_EXPORT bool do_is_equal (const memory_resource &other) const noexcept override
 Compare the equality of *this memory resource with another.
 

Private Member Functions

Function(s) implementing @c vecmem::memory_resource
VECMEM_CORE_EXPORT voiddo_allocate (std::size_t bytes, std::size_t) override
 Allocate memory in the arena.
 
VECMEM_CORE_EXPORT void do_deallocate (void *p, std::size_t bytes, std::size_t) override
 De-allocate a previously allocated memory block.
 

Detailed Description

Memory resource implementing an arena allocation scheme.

Constructor & Destructor Documentation

◆ arena_memory_resource()

vecmem::arena_memory_resource::arena_memory_resource ( memory_resource &  upstream,
std::size_t  initial_size,
std::size_t  maximum_size 
)

Construct the memory resource on top of an upstream memory resource.

Parameters
[in]upstreamThe vecmem::memory_resource to use for "upstream" memory allocations
[in]initial_sizeInitial memory memory allocation from upstream
[in]maximum_sizeThe maximal allowed allocation from upstream

Member Function Documentation

◆ do_is_equal()

bool vecmem::details::memory_resource_base::do_is_equal ( const memory_resource &  other) const
overrideprotectednoexceptinherited

Compare the equality of *this memory resource with another.

Parameters
otherThe other memory resource to compare with
Returns
true if the two memory resources are equal, false otherwise

The documentation for this class was generated from the following files: