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

This memory resource forwards allocation and deallocation requests to the upstream resource. More...

#include <vecmem/memory/identity_memory_resource.hpp>

Inheritance diagram for vecmem::identity_memory_resource:
vecmem::details::memory_resource_base

Public Member Functions

VECMEM_CORE_EXPORT identity_memory_resource (memory_resource &upstream)
 Constructs the identity memory resource.
 
VECMEM_CORE_EXPORT ~identity_memory_resource () override
 Destructor.
 

Private Member Functions

Function(s) implementing @c vecmem::memory_resource
VECMEM_CORE_EXPORT voiddo_allocate (std::size_t, std::size_t) override
 Allocate memory with the upstream resource.
 
VECMEM_CORE_EXPORT void do_deallocate (void *p, std::size_t, std::size_t) override
 De-allocate a previously allocated memory block.
 
VECMEM_CORE_EXPORT bool do_is_equal (const memory_resource &) const noexcept override
 Compare the equality of *this memory resource with another.
 

Detailed Description

This memory resource forwards allocation and deallocation requests to the upstream resource.

This allocator is here to act as the unit in the monoid of memory resources. It serves only a niche practical purpose.

Constructor & Destructor Documentation

◆ identity_memory_resource()

vecmem::identity_memory_resource::identity_memory_resource ( memory_resource &  upstream)
explicit

Constructs the identity memory resource.

Parameters
[in]upstreamThe upstream memory resource to use.

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