aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-02 14:08:55 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-02 14:08:55 +0000
commit4d76f412b071a05f0aae1d1307f2b58cb2778569 (patch)
tree2b5dc70e9b85ae6b435a2c281615cee0e85fd88b /arch/x86_64/src/memory
parent5ade8e0d5f190f2e439f81232b38b90c49c0cd1e (diff)
downloadteachos-4d76f412b071a05f0aae1d1307f2b58cb2778569.tar.xz
teachos-4d76f412b071a05f0aae1d1307f2b58cb2778569.zip
Attempt to fix crashes
Diffstat (limited to 'arch/x86_64/src/memory')
-rw-r--r--arch/x86_64/src/memory/allocator/tiny_frame_allocator.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}
}