diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-03-16 08:52:08 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-03-16 08:52:08 +0100 |
| commit | b67872907249bed3bad141fae97350959bffb009 (patch) | |
| tree | 72b940ed7ba66477efbd89866d7c8d482ab9cb09 /kernel/include | |
| parent | 4eb11660539e644e491ed5cf7e7918c3dc7baddd (diff) | |
| download | teachos-b67872907249bed3bad141fae97350959bffb009.tar.xz teachos-b67872907249bed3bad141fae97350959bffb009.zip | |
kernel/memory: rename free list allocator
It is not really a free list allocator, but rather a block list
allocator, since it contains both free and used blocks in the same list.
Diffstat (limited to 'kernel/include')
| -rw-r--r-- | kernel/include/kernel/memory/block_list_allocator.hpp (renamed from kernel/include/kernel/memory/free_list_allocator.hpp) | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/include/kernel/memory/free_list_allocator.hpp b/kernel/include/kernel/memory/block_list_allocator.hpp index 53a7b61..977ce89 100644 --- a/kernel/include/kernel/memory/free_list_allocator.hpp +++ b/kernel/include/kernel/memory/block_list_allocator.hpp @@ -1,5 +1,5 @@ -#ifndef TEACHOS_KERNEL_MEMORY_FREE_LIST_ALLOCATOR_HPP -#define TEACHOS_KERNEL_MEMORY_FREE_LIST_ALLOCATOR_HPP +#ifndef TEACHOS_KERNEL_MEMORY_BLOCK_LIST_ALLOCATOR_HPP +#define TEACHOS_KERNEL_MEMORY_BLOCK_LIST_ALLOCATOR_HPP #include "kapi/memory.hpp" @@ -17,15 +17,15 @@ namespace kernel::memory //! //! This allocator is designed to perform first-fit allocation using an intrusive doubly-linked list. The heap is //! expanded as needed. - struct free_list_allocator final : heap_allocator + struct block_list_allocator final : heap_allocator { //! Construct a new free list allocator with the given base address. - explicit free_list_allocator(kapi::memory::linear_address base) noexcept; + explicit block_list_allocator(kapi::memory::linear_address base) noexcept; - free_list_allocator(free_list_allocator const &) = delete; - free_list_allocator(free_list_allocator &&) = delete; - auto operator=(free_list_allocator const &) -> free_list_allocator & = delete; - auto operator=(free_list_allocator &&) -> free_list_allocator & = delete; + block_list_allocator(block_list_allocator const &) = delete; + block_list_allocator(block_list_allocator &&) = delete; + auto operator=(block_list_allocator const &) -> block_list_allocator & = delete; + auto operator=(block_list_allocator &&) -> block_list_allocator & = delete; //! Allocate a block of memory with the given alignment. //! @@ -70,7 +70,7 @@ namespace kernel::memory kapi::memory::linear_address m_base; kapi::memory::linear_address m_frontier; - block_header * m_free_list; + block_header * m_block_list; kstd::mutex m_lock; }; |
