Loading...
Searching...
No Matches
11#include "vecmem/utils/debug.hpp"
23#define VECMEM_MEMORY_RESOURCE_PIMPL_IMPL(CLASSNAME) \
24 CLASSNAME::CLASSNAME(CLASSNAME&&) = default; \
25 CLASSNAME::~CLASSNAME() = default; \
26 CLASSNAME& CLASSNAME::operator=(CLASSNAME&&) = default; \
27 void* CLASSNAME::do_allocate(std::size_t size, std::size_t alignment) { \
29 throw std::bad_alloc(); \
31 void* ptr = m_impl->allocate(size, alignment); \
32 VECMEM_DEBUG_MSG(2, "Allocated %lu bytes at %p", size, ptr); \
35 void CLASSNAME::do_deallocate(void* ptr, std::size_t size, \
36 std::size_t alignment) { \
37 assert(ptr != nullptr); \
41 VECMEM_DEBUG_MSG(2, "De-allocating memory at %p", ptr); \
42 m_impl->deallocate(ptr, size, alignment); \