11#include "vecmem/memory/details/memory_resource_base.hpp"
12#include "vecmem/memory/memory_resource.hpp"
13#include "vecmem/vecmem_core_export.hpp"
23class pool_memory_resource_impl;
55 std::size_t min_blocks_per_chunk = 16;
58 std::size_t min_bytes_per_chunk = 1024;
62 std::size_t max_blocks_per_chunk =
static_cast<std::size_t
>(1) << 20;
65 std::size_t max_bytes_per_chunk =
static_cast<std::size_t
>(1) << 30;
70 std::size_t smallest_block_size =
alignof(std::max_align_t);
75 std::size_t largest_block_size =
static_cast<std::size_t
>(1) << 20;
81 std::size_t alignment =
alignof(std::max_align_t);
85 bool cache_oversized =
true;
93 std::size_t cached_size_cutoff_factor = 16;
100 std::size_t cached_alignment_cutoff_factor = 16;
134 virtual void*
do_allocate(std::size_t, std::size_t)
override final;
138 std::size_t)
override final;
143 std::unique_ptr<details::pool_memory_resource_impl> m_impl;
Base class for implementations of the vecmem::memory_resource interface.
Definition memory_resource_base.hpp:25
Memory resource pooling allocations of various sizes.
Definition pool_memory_resource.hpp:39
virtual VECMEM_CORE_EXPORT void * do_allocate(std::size_t, std::size_t) override final
Allocate a blob of memory.
pool_memory_resource(const pool_memory_resource &)=delete
Disallow copying the memory resource.
VECMEM_CORE_EXPORT pool_memory_resource & operator=(pool_memory_resource &&rhs)
Move assignment operator.
virtual VECMEM_CORE_EXPORT void do_deallocate(void *p, std::size_t, std::size_t) override final
De-allocate a previously allocated memory blob.
pool_memory_resource & operator=(const pool_memory_resource &)=delete
Disallow copying the memory resource.
VECMEM_CORE_EXPORT pool_memory_resource(pool_memory_resource &&parent)
Move constructor.
VECMEM_CORE_EXPORT ~pool_memory_resource()
Destructor, freeing all allocations.
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
Runtime options for vecmem::pool_memory_resource.
Definition pool_memory_resource.hpp:43
options()
Default constructor.