vecmem 1.18.0
|
This memory resource forwards allocation and deallocation requests to the upstream resource. More...
#include <vecmem/memory/identity_memory_resource.hpp>
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 void * | do_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. | |
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.
|
explicit |
Constructs the identity memory resource.
[in] | upstream | The upstream memory resource to use. |