10#include "vecmem/memory/details/memory_resource_base.hpp"
11#include "vecmem/memory/memory_resource.hpp"
12#include "vecmem/vecmem_core_export.hpp"
46 virtual void*
do_allocate(std::size_t, std::size_t)
override final;
50 std::size_t)
override final;
54 const memory_resource&)
const noexcept override final;
59 memory_resource& m_upstream;
Base class for implementations of the vecmem::memory_resource interface.
Definition memory_resource_base.hpp:25
This memory resource forwards allocation and deallocation requests to the upstream resource.
Definition identity_memory_resource.hpp:26
virtual VECMEM_CORE_EXPORT void do_deallocate(void *p, std::size_t, std::size_t) override final
De-allocate a previously allocated memory block.
Definition identity_memory_resource.cpp:28
virtual VECMEM_CORE_EXPORT void * do_allocate(std::size_t, std::size_t) override final
Allocate memory with the upstream resource.
Definition identity_memory_resource.cpp:19
VECMEM_CORE_EXPORT ~identity_memory_resource()
Destructor.
virtual VECMEM_CORE_EXPORT bool do_is_equal(const memory_resource &) const noexcept override final
Compare the equality of *this memory resource with another.
Definition identity_memory_resource.cpp:37
Main namespace for the vecmem classes/functions.
Definition atomic_ref.hpp:16
std::vector< T, vecmem::polymorphic_allocator< T > > vector
Alias type for vectors with our polymorphic allocator.
Definition vector.hpp:35