diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-02 14:08:55 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-02 14:08:55 +0000 |
| commit | 4d76f412b071a05f0aae1d1307f2b58cb2778569 (patch) | |
| tree | 2b5dc70e9b85ae6b435a2c281615cee0e85fd88b /arch/x86_64/src/memory | |
| parent | 5ade8e0d5f190f2e439f81232b38b90c49c0cd1e (diff) | |
| download | teachos-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.cpp | 4 |
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; } } |
