4#ifndef WPI_MEMORY_DETAILL_FREE_LIST_HPP_INCLUDED
5#define WPI_MEMORY_DETAILL_FREE_LIST_HPP_INCLUDED
33 std::size_t number_of_nodes)
64 return (size / node_size_) * node_size_;
98 return first_ ==
nullptr;
102 void insert_impl(
void* mem, std::size_t size)
noexcept;
105 std::size_t node_size_, capacity_;
123 std::size_t number_of_nodes)
133 std::size_t size) noexcept
157 void insert(
void* mem, std::size_t size)
noexcept;
164 return (size / node_size_) * node_size_;
198 return capacity_ == 0u;
203 char* insert_impl(
void* mem, std::size_t size)
noexcept;
205 char* begin_node() noexcept;
206 char* end_node() noexcept;
208 std::uintptr_t begin_proxy_, end_proxy_;
209 std::
size_t node_size_, capacity_;
210 char * last_dealloc_, *last_dealloc_prev_;
215#if WPI_MEMORY_DEBUG_DOUBLE_DEALLOC_CHECK
Definition free_list.hpp:24
void * allocate() noexcept
free_memory_list(std::size_t node_size) noexcept
void insert(void *mem, std::size_t size) noexcept
std::size_t node_size() const noexcept
Definition free_list.hpp:82
static constexpr auto min_element_size
Definition free_list.hpp:27
void deallocate(void *ptr) noexcept
free_memory_list(std::size_t node_size, void *mem, std::size_t size) noexcept
free_memory_list(free_memory_list &&other) noexcept
bool empty() const noexcept
Definition free_list.hpp:96
std::size_t capacity() const noexcept
Definition free_list.hpp:91
~free_memory_list() noexcept=default
std::size_t usable_size(std::size_t size) const noexcept
Definition free_list.hpp:61
static constexpr std::size_t min_block_size(std::size_t node_size, std::size_t number_of_nodes)
Definition free_list.hpp:32
static constexpr auto min_element_alignment
Definition free_list.hpp:29
std::size_t alignment() const noexcept
Definition free_list.hpp:114
static constexpr std::size_t min_block_size(std::size_t node_size, std::size_t number_of_nodes)
Definition free_list.hpp:122
friend void swap(ordered_free_memory_list &a, ordered_free_memory_list &b) noexcept
std::size_t alignment() const noexcept
void insert(void *mem, std::size_t size) noexcept
void deallocate(void *ptr) noexcept
~ordered_free_memory_list() noexcept=default
std::size_t capacity() const noexcept
Definition free_list.hpp:191
bool empty() const noexcept
Definition free_list.hpp:196
ordered_free_memory_list(std::size_t node_size, void *mem, std::size_t size) noexcept
Definition free_list.hpp:132
void * allocate() noexcept
std::size_t usable_size(std::size_t size) const noexcept
Definition free_list.hpp:161
static constexpr auto min_element_size
Definition free_list.hpp:117
std::size_t node_size() const noexcept
Definition free_list.hpp:182
ordered_free_memory_list(ordered_free_memory_list &&other) noexcept
static constexpr auto min_element_alignment
Definition free_list.hpp:119
ordered_free_memory_list(std::size_t node_size) noexcept
detail namespace with internal helper functions
Definition input_adapters.h:32
Implement std::hash so that hash_code can be used in STL containers.
Definition PointerIntPair.h:280
std::remove_reference< T >::type && move(T &&arg) noexcept
Definition utility.hpp:25
void swap(free_memory_list &a, free_memory_list &b) noexcept
Memory namespace.
Definition heap_allocator.hpp:20
Foonathan namespace.
Definition ntcore_cpp.h:26