vecmem 1.18.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vecmem::host_memory_resource Class Referencefinal

Memory resource which wraps standard library memory allocation calls. More...

#include <vecmem/memory/host_memory_resource.hpp>

Inheritance diagram for vecmem::host_memory_resource:
vecmem::details::memory_resource_base

Public Member Functions

VECMEM_CORE_EXPORT host_memory_resource ()
 Default constructor.
 
VECMEM_CORE_EXPORT ~host_memory_resource () override
 Destructor.
 

Private Member Functions

Function(s) implementing @c vecmem::memory_resource
VECMEM_CORE_EXPORT voiddo_allocate (std::size_t size, std::size_t alignment) override
 Allocate standard host memory.
 
VECMEM_CORE_EXPORT void do_deallocate (void *p, std::size_t size, std::size_t alignment) override
 De-allocate a block of previously allocated memory.
 
VECMEM_CORE_EXPORT bool do_is_equal (const memory_resource &other) const noexcept override
 Compares *this for equality with other.
 

Detailed Description

Memory resource which wraps standard library memory allocation calls.

This is probably the simplest memory resource you can possibly write. It is a terminal resource which does nothing but wrap std::aligned_alloc and std::free. It is state-free (on the relevant levels of abstraction).


The documentation for this class was generated from the following files: