From 4d76f412b071a05f0aae1d1307f2b58cb2778569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sat, 2 Nov 2024 14:08:55 +0000 Subject: Attempt to fix crashes --- arch/x86_64/src/memory/allocator/tiny_frame_allocator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/x86_64/src/memory') diff --git a/arch/x86_64/src/memory/allocator/tiny_frame_allocator.cpp b/arch/x86_64/src/memory/allocator/tiny_frame_allocator.cpp index d07398a..b9fd2c8 100644 --- a/arch/x86_64/src/memory/allocator/tiny_frame_allocator.cpp +++ b/arch/x86_64/src/memory/allocator/tiny_frame_allocator.cpp @@ -11,7 +11,7 @@ namespace teachos::arch::memory::allocator if (frame_option.has_value()) { auto value = frame_option; - frame_option = std::nullopt; + frame_option.reset(); return value; } } @@ -24,7 +24,7 @@ namespace teachos::arch::memory::allocator { if (!frame_option.has_value()) { - frame_option = physical_frame; + frame_option.emplace(physical_frame); return; } } -- cgit v1.2.3