vecmem 1.18.0
|
This memory resource does nothing, but it does nothing for a purpose. More...
#include <vecmem/memory/terminal_memory_resource.hpp>
Public Member Functions | |
VECMEM_CORE_EXPORT | terminal_memory_resource (void) |
Constructs the terminal memory resource, without an upstream resource. | |
VECMEM_CORE_EXPORT | terminal_memory_resource (const memory_resource &upstream) |
Constructs the terminal memory resource, with an upstream resource. | |
VECMEM_CORE_EXPORT | ~terminal_memory_resource () override |
Destructor. | |
Private Member Functions | |
Function(s) implementing @c vecmem::memory_resource | |
VECMEM_CORE_EXPORT void * | do_allocate (std::size_t, std::size_t) override |
Throw std::bad_alloc . | |
VECMEM_CORE_EXPORT void | do_deallocate (void *p, std::size_t, std::size_t) override |
Do nothing. | |
VECMEM_CORE_EXPORT bool | do_is_equal (const memory_resource &other) const noexcept override |
Check whether the other resource is also a terminal resource. | |
This memory resource does nothing, but it does nothing for a purpose.
This allocator has little practical use, but can be useful for defining some conditional allocation schemes.
Reimplementation of std::pmr::null_memory_resource
but can accept another memory resource in its constructor.
|
explicit |
Constructs the terminal memory resource, with an upstream resource.
[in] | upstream | The upstream memory resource to use. |