diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-03-13 22:28:50 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-03-13 23:51:38 +0100 |
| commit | e284d574ed9237a215d994861cc502452fec11ce (patch) | |
| tree | 716c9929ef4c0df2b89ab0166c615271aec2374c /arch/x86_64/src | |
| parent | 7ba274d0838e5cd4e48e85f81557bbb837ed4349 (diff) | |
| download | teachos-e284d574ed9237a215d994861cc502452fec11ce.tar.xz teachos-e284d574ed9237a215d994861cc502452fec11ce.zip | |
kernel/memory: implement basic bitmap allocator
Diffstat (limited to 'arch/x86_64/src')
| -rw-r--r-- | arch/x86_64/src/memory/region_allocator.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86_64/src/memory/region_allocator.cpp b/arch/x86_64/src/memory/region_allocator.cpp index a2dfd48..36902ad 100644 --- a/arch/x86_64/src/memory/region_allocator.cpp +++ b/arch/x86_64/src/memory/region_allocator.cpp @@ -124,6 +124,15 @@ namespace arch::memory return std::nullopt; } + auto region_allocator::mark_used(kapi::memory::frame frame) -> void + { + if (frame < m_next_frame) + { + m_next_frame = frame; + find_next_frame(); + } + } + auto region_allocator::release_many(std::pair<kapi::memory::frame, std::size_t>) -> void {} auto region_allocator::next_free_frame() noexcept -> std::optional<kapi::memory::frame> |
