diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-13 01:21:12 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-02-19 01:16:25 +0100 |
commit | 9e520e8f1233cb4e586b076cd5cc8b7c22ec85ce (patch) | |
tree | 8a66a3efb40ec4f36374c97e02527010d4034902 /src/core/hle/kernel/k_slab_heap.h | |
parent | hle: kernel: Migrate MemoryLayout to KMemoryLayout. (diff) | |
download | yuzu-9e520e8f1233cb4e586b076cd5cc8b7c22ec85ce.tar yuzu-9e520e8f1233cb4e586b076cd5cc8b7c22ec85ce.tar.gz yuzu-9e520e8f1233cb4e586b076cd5cc8b7c22ec85ce.tar.bz2 yuzu-9e520e8f1233cb4e586b076cd5cc8b7c22ec85ce.tar.lz yuzu-9e520e8f1233cb4e586b076cd5cc8b7c22ec85ce.tar.xz yuzu-9e520e8f1233cb4e586b076cd5cc8b7c22ec85ce.tar.zst yuzu-9e520e8f1233cb4e586b076cd5cc8b7c22ec85ce.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_slab_heap.h (renamed from src/core/hle/kernel/memory/slab_heap.h) | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/core/hle/kernel/memory/slab_heap.h b/src/core/hle/kernel/k_slab_heap.h index 465eaddb3..aa4471d2f 100644 --- a/src/core/hle/kernel/memory/slab_heap.h +++ b/src/core/hle/kernel/k_slab_heap.h @@ -2,9 +2,6 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -// This file references various implementation details from Atmosphere, an open-source firmware for -// the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. - #pragma once #include <atomic> @@ -12,17 +9,17 @@ #include "common/assert.h" #include "common/common_types.h" -namespace Kernel::Memory { +namespace Kernel { namespace impl { -class SlabHeapImpl final : NonCopyable { +class KSlabHeapImpl final : NonCopyable { public: struct Node { Node* next{}; }; - constexpr SlabHeapImpl() = default; + constexpr KSlabHeapImpl() = default; void Initialize(std::size_t size) { ASSERT(head == nullptr); @@ -65,9 +62,9 @@ private: } // namespace impl -class SlabHeapBase : NonCopyable { +class KSlabHeapBase : NonCopyable { public: - constexpr SlabHeapBase() = default; + constexpr KSlabHeapBase() = default; constexpr bool Contains(uintptr_t addr) const { return start <= addr && addr < end; @@ -126,7 +123,7 @@ public: } private: - using Impl = impl::SlabHeapImpl; + using Impl = impl::KSlabHeapImpl; Impl impl; uintptr_t peak{}; @@ -135,9 +132,9 @@ private: }; template <typename T> -class SlabHeap final : public SlabHeapBase { +class KSlabHeap final : public KSlabHeapBase { public: - constexpr SlabHeap() : SlabHeapBase() {} + constexpr KSlabHeap() : KSlabHeapBase() {} void Initialize(void* memory, std::size_t memory_size) { InitializeImpl(sizeof(T), memory, memory_size); @@ -160,4 +157,4 @@ public: } }; -} // namespace Kernel::Memory +} // namespace Kernel |