4#ifndef WPI_MEMORY_DETAIL_SMALL_FREE_LIST_HPP_INCLUDED
5#define WPI_MEMORY_DETAIL_SMALL_FREE_LIST_HPP_INCLUDED
49 static constexpr std::size_t chunk_count(std::size_t number_of_nodes)
63 std::size_t number_of_nodes)
65 return chunk_count(number_of_nodes)
91 void insert(
void* mem, std::size_t size)
noexcept;
123 return find_chunk_impl(n) !=
nullptr;
143 return capacity_ == 0u;
147 chunk* find_chunk_impl(std::size_t n = 1) noexcept;
148 chunk* find_chunk_impl(
unsigned char* node,
chunk_base* first,
150 chunk* find_chunk_impl(
unsigned char* node) noexcept;
153 std::
size_t node_size_, capacity_;
Definition small_free_list.hpp:48
bool empty() const noexcept
Definition small_free_list.hpp:141
small_free_memory_list(std::size_t node_size) noexcept
void deallocate(void *node) noexcept
bool find_chunk(std::size_t n) noexcept
Definition small_free_list.hpp:121
std::size_t usable_size(std::size_t size) const noexcept
static constexpr std::size_t min_element_size
Definition small_free_list.hpp:57
~small_free_memory_list() noexcept=default
small_free_memory_list(std::size_t node_size, void *mem, std::size_t size) noexcept
void insert(void *mem, std::size_t size) noexcept
small_free_memory_list(small_free_memory_list &&other) noexcept
std::size_t node_size() const noexcept
Definition small_free_list.hpp:127
static constexpr std::size_t min_block_size(std::size_t node_size, std::size_t number_of_nodes)
Definition small_free_list.hpp:62
static constexpr std::size_t min_element_alignment
Definition small_free_list.hpp:59
void * allocate() noexcept
std::size_t capacity() const noexcept
Definition small_free_list.hpp:136
std::size_t alignment() const noexcept
void deallocate(void *mem, std::size_t size) noexcept
Definition small_free_list.hpp:111
friend void swap(small_free_memory_list &a, small_free_memory_list &b) 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
constexpr std::size_t chunk_max_nodes
Definition small_free_list.hpp:38
constexpr std::size_t max_alignment
Definition align.hpp:42
std::remove_reference< T >::type && move(T &&arg) noexcept
Definition utility.hpp:25
constexpr std::size_t chunk_memory_offset
Definition small_free_list.hpp:34
Memory namespace.
Definition heap_allocator.hpp:20
Foonathan namespace.
Definition ntcore_cpp.h:26
Definition small_free_list.hpp:21
unsigned char capacity
Definition small_free_list.hpp:26
unsigned char no_nodes
Definition small_free_list.hpp:27
chunk_base * next
Definition small_free_list.hpp:23
chunk_base() noexcept=default
chunk_base * prev
Definition small_free_list.hpp:22
unsigned char first_free
Definition small_free_list.hpp:25