4#ifndef WPI_MEMORY_DETAIL_LOWLEVEL_ALLOCATOR_HPP_INCLUDED
5#define WPI_MEMORY_DETAIL_LOWLEVEL_ALLOCATOR_HPP_INCLUDED
21 template <
class Functor>
35 template <
class Functor>
54 auto memory = Functor::allocate(actual_size, alignment);
63 void deallocate_node(
void* node, std::size_t size, std::size_t alignment)
noexcept
68 Functor::deallocate(
memory, actual_size, alignment);
75 return Functor::max_node_size();
79#define WPI_MEMORY_LL_ALLOCATOR_LEAK_CHECKER(functor, var_name) \
80 WPI_MEMORY_GLOBAL_LEAK_CHECKER(lowlevel_allocator_leak_handler<functor>, var_name)
Definition lowlevel_allocator.hpp:37
~lowlevel_allocator() noexcept
Definition lowlevel_allocator.hpp:43
std::false_type is_stateful
Definition lowlevel_allocator.hpp:39
void deallocate_node(void *node, std::size_t size, std::size_t alignment) noexcept
Definition lowlevel_allocator.hpp:63
lowlevel_allocator() noexcept
Definition lowlevel_allocator.hpp:41
lowlevel_allocator & operator=(lowlevel_allocator &&) noexcept
Definition lowlevel_allocator.hpp:45
void * allocate_node(std::size_t size, std::size_t alignment)
Definition lowlevel_allocator.hpp:50
lowlevel_allocator(lowlevel_allocator &&) noexcept
Definition lowlevel_allocator.hpp:42
std::size_t max_node_size() const noexcept
Definition lowlevel_allocator.hpp:73
Definition debug_helpers.hpp:102
void on_allocate(std::size_t) noexcept
Definition debug_helpers.hpp:113
void on_deallocate(std::size_t) noexcept
Definition debug_helpers.hpp:114
The exception class thrown when a low level allocator runs out of memory.
Definition error.hpp:65
#define WPI_THROW(Ex)
Definition config.hpp:33
detail namespace with internal helper functions
Definition input_adapters.h:32
void * debug_fill_new(void *memory, std::size_t, std::size_t) noexcept
Definition debug_helpers.hpp:52
constexpr std::size_t max_alignment
Definition align.hpp:42
void * debug_fill_free(void *memory, std::size_t, std::size_t) noexcept
Definition debug_helpers.hpp:57
void debug_handle_memory_leak(const allocator_info &info, std::ptrdiff_t amount)
constexpr std::size_t debug_fence_size
Definition debug_helpers.hpp:22
Memory namespace.
Definition heap_allocator.hpp:20
Foonathan namespace.
Definition ntcore_cpp.h:26
Definition lowlevel_allocator.hpp:23
void operator()(std::ptrdiff_t amount)
Definition lowlevel_allocator.hpp:24