aboutsummaryrefslogtreecommitdiff
path: root/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-03-16 11:17:43 +0100
committerFelix Morgner <felix.morgner@ost.ch>2026-03-16 11:17:43 +0100
commit913f40cbf8e578323009c0dcd6a22e99668a0010 (patch)
tree97a2892d1f4cdbe99602a2ecf0ced1304e1092fa /kapi
parentbb0637b1639461fdcb59f3bdcc65766e1d9c8e94 (diff)
downloadteachos-913f40cbf8e578323009c0dcd6a22e99668a0010.tar.xz
teachos-913f40cbf8e578323009c0dcd6a22e99668a0010.zip
x86_64/memory: clean up bootstrap allocators
Diffstat (limited to 'kapi')
-rw-r--r--kapi/include/kapi/memory.hpp3
-rw-r--r--kapi/include/kapi/memory/buffered_allocator.hpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/kapi/include/kapi/memory.hpp b/kapi/include/kapi/memory.hpp
index 9ef2cd7..e31fa34 100644
--- a/kapi/include/kapi/memory.hpp
+++ b/kapi/include/kapi/memory.hpp
@@ -31,6 +31,9 @@ namespace kapi::memory
//! This function initializes the kernel-wide physical memory manager. The function will invoke the handoff handler to
//! transfer the platform-specific frame allocation state to the physical memory manager.
//!
+ //! @note Once this function returns, the global allocator has been replaced by the platform-agnostic, kernel-defined
+ //! allocator. Any state of the platform specific allocator may be released.
+ //!
//! @param frame_count The number of frames present in the system.
//! @param handoff_handler A function to be invoked to transfer the platform-specific frame allocation state. The
//! allocator to hand off to is passed to the handler.
diff --git a/kapi/include/kapi/memory/buffered_allocator.hpp b/kapi/include/kapi/memory/buffered_allocator.hpp
index 286c841..f9dc781 100644
--- a/kapi/include/kapi/memory/buffered_allocator.hpp
+++ b/kapi/include/kapi/memory/buffered_allocator.hpp
@@ -37,7 +37,7 @@ namespace kapi::memory
std::ranges::for_each(m_pool, [this](auto const & maybe_frame) {
if (maybe_frame)
{
- m_underlying->release_many({*maybe_frame, 1});
+ m_underlying->release(*maybe_frame);
}
});
}