33#ifndef DART_COMMON_CALLOCATOR_HPP_
34#define DART_COMMON_CALLOCATOR_HPP_
54 [[nodiscard]]
void*
allocate(
size_t bytes)
noexcept override;
57 void deallocate(
void* pointer,
size_t bytes)
override;
60 void print(std::ostream& os = std::cout,
int indent = 0)
const override;
#define DART_STRING_TYPE(type_name)
Definition Castable.hpp:38
A stateless memory allocator (in release mode) that uses std::malloc and std::free for memory allocat...
Definition CAllocator.hpp:43
void print(std::ostream &os=std::cout, int indent=0) const override
Prints state of the memory allocator.
Definition CAllocator.cpp:74
~CAllocator() override
Destructor.
Definition CAllocator.cpp:48
CAllocator() noexcept
Constructor.
Definition CAllocator.cpp:42
void deallocate(void *pointer, size_t bytes) override
Deallocates the storage referenced by the pointer p, which must be a pointer obtained by an earlier c...
Definition CAllocator.cpp:66
void * allocate(size_t bytes) noexcept override
Allocates size bytes of uninitialized storage.
Definition CAllocator.cpp:54
Base class for std::allocator compatible allocators.
Definition MemoryAllocator.hpp:46