12#include "vecmem/memory/memory_resource.hpp"
13#include "vecmem/vecmem_core_export.hpp"
60 std::size_t alignment =
alignof(std::max_align_t));
76 std::size_t alignment =
alignof(std::max_align_t));
105 template <
typename T>
119 template <
typename T,
typename...
Args>
131 template <
typename T>
135 memory_resource& m_mem;
142#include "vecmem/memory/impl/allocator.ipp"
An allocator class that wraps a memory resource.
Definition allocator.hpp:37
T * allocate_object(std::size_t n=1)
Allocate space for (a number of) objects.
Definition allocator.ipp:15
T * new_object(Args &&... args)
Allocate and construct a new object.
Definition allocator.ipp:36
void deallocate_object(T *p, std::size_t n=1)
Deallocate space for (a number of) objects.
Definition allocator.ipp:26
void * allocate_bytes(std::size_t bytes, std::size_t alignment=alignof(std::max_align_t))
Allocate a given number of bytes.
Definition allocator.cpp:16
void delete_object(T *p)
Deconstruct and deallocate an object.
Definition allocator.ipp:54
void deallocate_bytes(void *p, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t))
Deallocate a given number of bytes.
Definition allocator.cpp:29
Main namespace for the vecmem classes/functions.
Definition atomic_ref.hpp:16