summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorGravatar Morph2022-02-02 16:04:26 -0500
committerGravatar GitHub2022-02-02 16:04:26 -0500
commitd68eb751c53df785f842d56983ce4dfbb89aae3f (patch)
tree510752a162e2bbb0e0f5a1e60b499aa4dca0493e /src/core/hle/kernel
parentMerge pull request #7834 from german77/repeat (diff)
parentcommon_types: Remove NonCopyable struct (diff)
downloadyuzu-d68eb751c53df785f842d56983ce4dfbb89aae3f.tar.gz
yuzu-d68eb751c53df785f842d56983ce4dfbb89aae3f.tar.xz
yuzu-d68eb751c53df785f842d56983ce4dfbb89aae3f.zip
Merge pull request #7838 from lioncash/noncopy
common_types: Remove NonCopyable struct
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/k_auto_object.h7
-rw-r--r--src/core/hle/kernel/k_auto_object_container.h4
-rw-r--r--src/core/hle/kernel/k_handle_table.h3
-rw-r--r--src/core/hle/kernel/k_memory_manager.h42
-rw-r--r--src/core/hle/kernel/k_memory_region.h80
-rw-r--r--src/core/hle/kernel/k_page_heap.h90
-rw-r--r--src/core/hle/kernel/k_page_table.cpp2
-rw-r--r--src/core/hle/kernel/k_page_table.h7
-rw-r--r--src/core/hle/kernel/k_slab_heap.h13
9 files changed, 140 insertions, 108 deletions
diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h
index 165b76747..05779f2d5 100644
--- a/src/core/hle/kernel/k_auto_object.h
+++ b/src/core/hle/kernel/k_auto_object.h
@@ -20,8 +20,6 @@ class KernelCore;
20class KProcess; 20class KProcess;
21 21
22#define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \ 22#define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \
23 YUZU_NON_COPYABLE(CLASS); \
24 YUZU_NON_MOVEABLE(CLASS); \
25 \ 23 \
26private: \ 24private: \
27 friend class ::Kernel::KClassTokenGenerator; \ 25 friend class ::Kernel::KClassTokenGenerator; \
@@ -32,6 +30,9 @@ private:
32 } \ 30 } \
33 \ 31 \
34public: \ 32public: \
33 YUZU_NON_COPYABLE(CLASS); \
34 YUZU_NON_MOVEABLE(CLASS); \
35 \
35 using BaseClass = BASE_CLASS; \ 36 using BaseClass = BASE_CLASS; \
36 static constexpr TypeObj GetStaticTypeObj() { \ 37 static constexpr TypeObj GetStaticTypeObj() { \
37 constexpr ClassTokenType Token = ClassToken(); \ 38 constexpr ClassTokenType Token = ClassToken(); \
@@ -224,9 +225,9 @@ private:
224 225
225template <typename T> 226template <typename T>
226class KScopedAutoObject { 227class KScopedAutoObject {
228public:
227 YUZU_NON_COPYABLE(KScopedAutoObject); 229 YUZU_NON_COPYABLE(KScopedAutoObject);
228 230
229public:
230 constexpr KScopedAutoObject() = default; 231 constexpr KScopedAutoObject() = default;
231 232
232 constexpr KScopedAutoObject(T* o) : m_obj(o) { 233 constexpr KScopedAutoObject(T* o) : m_obj(o) {
diff --git a/src/core/hle/kernel/k_auto_object_container.h b/src/core/hle/kernel/k_auto_object_container.h
index 4eadfe99d..697cc4289 100644
--- a/src/core/hle/kernel/k_auto_object_container.h
+++ b/src/core/hle/kernel/k_auto_object_container.h
@@ -16,13 +16,12 @@ class KernelCore;
16class KProcess; 16class KProcess;
17 17
18class KAutoObjectWithListContainer { 18class KAutoObjectWithListContainer {
19public:
19 YUZU_NON_COPYABLE(KAutoObjectWithListContainer); 20 YUZU_NON_COPYABLE(KAutoObjectWithListContainer);
20 YUZU_NON_MOVEABLE(KAutoObjectWithListContainer); 21 YUZU_NON_MOVEABLE(KAutoObjectWithListContainer);
21 22
22public:
23 using ListType = boost::intrusive::rbtree<KAutoObjectWithList>; 23 using ListType = boost::intrusive::rbtree<KAutoObjectWithList>;
24 24
25public:
26 class ListAccessor : public KScopedLightLock { 25 class ListAccessor : public KScopedLightLock {
27 public: 26 public:
28 explicit ListAccessor(KAutoObjectWithListContainer* container) 27 explicit ListAccessor(KAutoObjectWithListContainer* container)
@@ -48,7 +47,6 @@ public:
48 47
49 friend class ListAccessor; 48 friend class ListAccessor;
50 49
51public:
52 KAutoObjectWithListContainer(KernelCore& kernel) : m_lock(kernel), m_object_list() {} 50 KAutoObjectWithListContainer(KernelCore& kernel) : m_lock(kernel), m_object_list() {}
53 51
54 void Initialize() {} 52 void Initialize() {}
diff --git a/src/core/hle/kernel/k_handle_table.h b/src/core/hle/kernel/k_handle_table.h
index 4b114ec2f..87004a0f9 100644
--- a/src/core/hle/kernel/k_handle_table.h
+++ b/src/core/hle/kernel/k_handle_table.h
@@ -22,13 +22,12 @@ namespace Kernel {
22class KernelCore; 22class KernelCore;
23 23
24class KHandleTable { 24class KHandleTable {
25public:
25 YUZU_NON_COPYABLE(KHandleTable); 26 YUZU_NON_COPYABLE(KHandleTable);
26 YUZU_NON_MOVEABLE(KHandleTable); 27 YUZU_NON_MOVEABLE(KHandleTable);
27 28
28public:
29 static constexpr size_t MaxTableSize = 1024; 29 static constexpr size_t MaxTableSize = 1024;
30 30
31public:
32 explicit KHandleTable(KernelCore& kernel_); 31 explicit KHandleTable(KernelCore& kernel_);
33 ~KHandleTable(); 32 ~KHandleTable();
34 33
diff --git a/src/core/hle/kernel/k_memory_manager.h b/src/core/hle/kernel/k_memory_manager.h
index abd6c8ace..17c7690f1 100644
--- a/src/core/hle/kernel/k_memory_manager.h
+++ b/src/core/hle/kernel/k_memory_manager.h
@@ -8,6 +8,7 @@
8#include <mutex> 8#include <mutex>
9#include <tuple> 9#include <tuple>
10 10
11#include "common/common_funcs.h"
11#include "common/common_types.h" 12#include "common/common_types.h"
12#include "core/hle/kernel/k_page_heap.h" 13#include "core/hle/kernel/k_page_heap.h"
13#include "core/hle/result.h" 14#include "core/hle/result.h"
@@ -20,8 +21,11 @@ namespace Kernel {
20 21
21class KPageLinkedList; 22class KPageLinkedList;
22 23
23class KMemoryManager final : NonCopyable { 24class KMemoryManager final {
24public: 25public:
26 YUZU_NON_COPYABLE(KMemoryManager);
27 YUZU_NON_MOVEABLE(KMemoryManager);
28
25 enum class Pool : u32 { 29 enum class Pool : u32 {
26 Application = 0, 30 Application = 0,
27 Applet = 1, 31 Applet = 1,
@@ -88,26 +92,13 @@ public:
88 } 92 }
89 93
90private: 94private:
91 class Impl final : NonCopyable { 95 class Impl final {
92 private:
93 using RefCount = u16;
94
95 private:
96 KPageHeap heap;
97 Pool pool{};
98
99 public: 96 public:
100 static std::size_t CalculateManagementOverheadSize(std::size_t region_size); 97 YUZU_NON_COPYABLE(Impl);
101 98 YUZU_NON_MOVEABLE(Impl);
102 static constexpr std::size_t CalculateOptimizedProcessOverheadSize(
103 std::size_t region_size) {
104 return (Common::AlignUp((region_size / PageSize), Common::BitSize<u64>()) /
105 Common::BitSize<u64>()) *
106 sizeof(u64);
107 }
108 99
109 public:
110 Impl() = default; 100 Impl() = default;
101 ~Impl() = default;
111 102
112 std::size_t Initialize(Pool new_pool, u64 start_address, u64 end_address); 103 std::size_t Initialize(Pool new_pool, u64 start_address, u64 end_address);
113 104
@@ -130,6 +121,21 @@ private:
130 constexpr VAddr GetEndAddress() const { 121 constexpr VAddr GetEndAddress() const {
131 return heap.GetEndAddress(); 122 return heap.GetEndAddress();
132 } 123 }
124
125 static std::size_t CalculateManagementOverheadSize(std::size_t region_size);
126
127 static constexpr std::size_t CalculateOptimizedProcessOverheadSize(
128 std::size_t region_size) {
129 return (Common::AlignUp((region_size / PageSize), Common::BitSize<u64>()) /
130 Common::BitSize<u64>()) *
131 sizeof(u64);
132 }
133
134 private:
135 using RefCount = u16;
136
137 KPageHeap heap;
138 Pool pool{};
133 }; 139 };
134 140
135private: 141private:
diff --git a/src/core/hle/kernel/k_memory_region.h b/src/core/hle/kernel/k_memory_region.h
index 90ab8fd62..e9bdf4e59 100644
--- a/src/core/hle/kernel/k_memory_region.h
+++ b/src/core/hle/kernel/k_memory_region.h
@@ -5,6 +5,7 @@
5#pragma once 5#pragma once
6 6
7#include "common/assert.h" 7#include "common/assert.h"
8#include "common/common_funcs.h"
8#include "common/common_types.h" 9#include "common/common_types.h"
9#include "common/intrusive_red_black_tree.h" 10#include "common/intrusive_red_black_tree.h"
10#include "core/hle/kernel/k_memory_region_type.h" 11#include "core/hle/kernel/k_memory_region_type.h"
@@ -13,11 +14,13 @@ namespace Kernel {
13 14
14class KMemoryRegionAllocator; 15class KMemoryRegionAllocator;
15 16
16class KMemoryRegion final : public Common::IntrusiveRedBlackTreeBaseNode<KMemoryRegion>, 17class KMemoryRegion final : public Common::IntrusiveRedBlackTreeBaseNode<KMemoryRegion> {
17 NonCopyable {
18 friend class KMemoryRegionTree; 18 friend class KMemoryRegionTree;
19 19
20public: 20public:
21 YUZU_NON_COPYABLE(KMemoryRegion);
22 YUZU_NON_MOVEABLE(KMemoryRegion);
23
21 constexpr KMemoryRegion() = default; 24 constexpr KMemoryRegion() = default;
22 constexpr KMemoryRegion(u64 address_, u64 last_address_) 25 constexpr KMemoryRegion(u64 address_, u64 last_address_)
23 : address{address_}, last_address{last_address_} {} 26 : address{address_}, last_address{last_address_} {}
@@ -29,6 +32,8 @@ public:
29 : KMemoryRegion(address_, last_address_, std::numeric_limits<u64>::max(), attributes_, 32 : KMemoryRegion(address_, last_address_, std::numeric_limits<u64>::max(), attributes_,
30 type_id_) {} 33 type_id_) {}
31 34
35 ~KMemoryRegion() = default;
36
32 static constexpr int Compare(const KMemoryRegion& lhs, const KMemoryRegion& rhs) { 37 static constexpr int Compare(const KMemoryRegion& lhs, const KMemoryRegion& rhs) {
33 if (lhs.GetAddress() < rhs.GetAddress()) { 38 if (lhs.GetAddress() < rhs.GetAddress()) {
34 return -1; 39 return -1;
@@ -39,16 +44,6 @@ public:
39 } 44 }
40 } 45 }
41 46
42private:
43 constexpr void Reset(u64 a, u64 la, u64 p, u32 r, u32 t) {
44 address = a;
45 pair_address = p;
46 last_address = la;
47 attributes = r;
48 type_id = t;
49 }
50
51public:
52 constexpr u64 GetAddress() const { 47 constexpr u64 GetAddress() const {
53 return address; 48 return address;
54 } 49 }
@@ -108,6 +103,14 @@ public:
108 } 103 }
109 104
110private: 105private:
106 constexpr void Reset(u64 a, u64 la, u64 p, u32 r, u32 t) {
107 address = a;
108 pair_address = p;
109 last_address = la;
110 attributes = r;
111 type_id = t;
112 }
113
111 u64 address{}; 114 u64 address{};
112 u64 last_address{}; 115 u64 last_address{};
113 u64 pair_address{}; 116 u64 pair_address{};
@@ -115,8 +118,25 @@ private:
115 u32 type_id{}; 118 u32 type_id{};
116}; 119};
117 120
118class KMemoryRegionTree final : NonCopyable { 121class KMemoryRegionTree final {
122private:
123 using TreeType =
124 Common::IntrusiveRedBlackTreeBaseTraits<KMemoryRegion>::TreeType<KMemoryRegion>;
125
119public: 126public:
127 YUZU_NON_COPYABLE(KMemoryRegionTree);
128 YUZU_NON_MOVEABLE(KMemoryRegionTree);
129
130 using value_type = TreeType::value_type;
131 using size_type = TreeType::size_type;
132 using difference_type = TreeType::difference_type;
133 using pointer = TreeType::pointer;
134 using const_pointer = TreeType::const_pointer;
135 using reference = TreeType::reference;
136 using const_reference = TreeType::const_reference;
137 using iterator = TreeType::iterator;
138 using const_iterator = TreeType::const_iterator;
139
120 struct DerivedRegionExtents { 140 struct DerivedRegionExtents {
121 const KMemoryRegion* first_region{}; 141 const KMemoryRegion* first_region{};
122 const KMemoryRegion* last_region{}; 142 const KMemoryRegion* last_region{};
@@ -140,29 +160,9 @@ public:
140 } 160 }
141 }; 161 };
142 162
143private:
144 using TreeType =
145 Common::IntrusiveRedBlackTreeBaseTraits<KMemoryRegion>::TreeType<KMemoryRegion>;
146
147public:
148 using value_type = TreeType::value_type;
149 using size_type = TreeType::size_type;
150 using difference_type = TreeType::difference_type;
151 using pointer = TreeType::pointer;
152 using const_pointer = TreeType::const_pointer;
153 using reference = TreeType::reference;
154 using const_reference = TreeType::const_reference;
155 using iterator = TreeType::iterator;
156 using const_iterator = TreeType::const_iterator;
157
158private:
159 TreeType m_tree{};
160 KMemoryRegionAllocator& memory_region_allocator;
161
162public:
163 explicit KMemoryRegionTree(KMemoryRegionAllocator& memory_region_allocator_); 163 explicit KMemoryRegionTree(KMemoryRegionAllocator& memory_region_allocator_);
164 ~KMemoryRegionTree() = default;
164 165
165public:
166 KMemoryRegion* FindModifiable(u64 address) { 166 KMemoryRegion* FindModifiable(u64 address) {
167 if (auto it = this->find(KMemoryRegion(address, address, 0, 0)); it != this->end()) { 167 if (auto it = this->find(KMemoryRegion(address, address, 0, 0)); it != this->end()) {
168 return std::addressof(*it); 168 return std::addressof(*it);
@@ -241,7 +241,6 @@ public:
241 return GetDerivedRegionExtents(static_cast<KMemoryRegionType>(type_id)); 241 return GetDerivedRegionExtents(static_cast<KMemoryRegionType>(type_id));
242 } 242 }
243 243
244public:
245 void InsertDirectly(u64 address, u64 last_address, u32 attr = 0, u32 type_id = 0); 244 void InsertDirectly(u64 address, u64 last_address, u32 attr = 0, u32 type_id = 0);
246 bool Insert(u64 address, size_t size, u32 type_id, u32 new_attr = 0, u32 old_attr = 0); 245 bool Insert(u64 address, size_t size, u32 type_id, u32 new_attr = 0, u32 old_attr = 0);
247 246
@@ -252,7 +251,6 @@ public:
252 return this->GetRandomAlignedRegion(size + 2 * guard_size, alignment, type_id) + guard_size; 251 return this->GetRandomAlignedRegion(size + 2 * guard_size, alignment, type_id) + guard_size;
253 } 252 }
254 253
255public:
256 // Iterator accessors. 254 // Iterator accessors.
257 iterator begin() { 255 iterator begin() {
258 return m_tree.begin(); 256 return m_tree.begin();
@@ -322,13 +320,21 @@ public:
322 iterator nfind(const_reference ref) const { 320 iterator nfind(const_reference ref) const {
323 return m_tree.nfind(ref); 321 return m_tree.nfind(ref);
324 } 322 }
323
324private:
325 TreeType m_tree{};
326 KMemoryRegionAllocator& memory_region_allocator;
325}; 327};
326 328
327class KMemoryRegionAllocator final : NonCopyable { 329class KMemoryRegionAllocator final {
328public: 330public:
331 YUZU_NON_COPYABLE(KMemoryRegionAllocator);
332 YUZU_NON_MOVEABLE(KMemoryRegionAllocator);
333
329 static constexpr size_t MaxMemoryRegions = 200; 334 static constexpr size_t MaxMemoryRegions = 200;
330 335
331 constexpr KMemoryRegionAllocator() = default; 336 constexpr KMemoryRegionAllocator() = default;
337 constexpr ~KMemoryRegionAllocator() = default;
332 338
333 template <typename... Args> 339 template <typename... Args>
334 KMemoryRegion* Allocate(Args&&... args) { 340 KMemoryRegion* Allocate(Args&&... args) {
diff --git a/src/core/hle/kernel/k_page_heap.h b/src/core/hle/kernel/k_page_heap.h
index 8d9f30523..a65aa28a0 100644
--- a/src/core/hle/kernel/k_page_heap.h
+++ b/src/core/hle/kernel/k_page_heap.h
@@ -8,14 +8,44 @@
8#include <vector> 8#include <vector>
9 9
10#include "common/alignment.h" 10#include "common/alignment.h"
11#include "common/common_funcs.h"
11#include "common/common_types.h" 12#include "common/common_types.h"
12#include "core/hle/kernel/k_page_bitmap.h" 13#include "core/hle/kernel/k_page_bitmap.h"
13#include "core/hle/kernel/memory_types.h" 14#include "core/hle/kernel/memory_types.h"
14 15
15namespace Kernel { 16namespace Kernel {
16 17
17class KPageHeap final : NonCopyable { 18class KPageHeap final {
18public: 19public:
20 YUZU_NON_COPYABLE(KPageHeap);
21 YUZU_NON_MOVEABLE(KPageHeap);
22
23 KPageHeap() = default;
24 ~KPageHeap() = default;
25
26 constexpr VAddr GetAddress() const {
27 return heap_address;
28 }
29 constexpr std::size_t GetSize() const {
30 return heap_size;
31 }
32 constexpr VAddr GetEndAddress() const {
33 return GetAddress() + GetSize();
34 }
35 constexpr std::size_t GetPageOffset(VAddr block) const {
36 return (block - GetAddress()) / PageSize;
37 }
38
39 void Initialize(VAddr heap_address, std::size_t heap_size, std::size_t metadata_size);
40 VAddr AllocateBlock(s32 index, bool random);
41 void Free(VAddr addr, std::size_t num_pages);
42
43 void UpdateUsedSize() {
44 used_size = heap_size - (GetNumFreePages() * PageSize);
45 }
46
47 static std::size_t CalculateManagementOverheadSize(std::size_t region_size);
48
19 static constexpr s32 GetAlignedBlockIndex(std::size_t num_pages, std::size_t align_pages) { 49 static constexpr s32 GetAlignedBlockIndex(std::size_t num_pages, std::size_t align_pages) {
20 const auto target_pages{std::max(num_pages, align_pages)}; 50 const auto target_pages{std::max(num_pages, align_pages)};
21 for (std::size_t i = 0; i < NumMemoryBlockPageShifts; i++) { 51 for (std::size_t i = 0; i < NumMemoryBlockPageShifts; i++) {
@@ -45,21 +75,13 @@ public:
45 } 75 }
46 76
47private: 77private:
48 static constexpr std::size_t NumMemoryBlockPageShifts{7}; 78 class Block final {
49 static constexpr std::array<std::size_t, NumMemoryBlockPageShifts> MemoryBlockPageShifts{
50 0xC, 0x10, 0x15, 0x16, 0x19, 0x1D, 0x1E,
51 };
52
53 class Block final : NonCopyable {
54 private:
55 KPageBitmap bitmap;
56 VAddr heap_address{};
57 uintptr_t end_offset{};
58 std::size_t block_shift{};
59 std::size_t next_block_shift{};
60
61 public: 79 public:
80 YUZU_NON_COPYABLE(Block);
81 YUZU_NON_MOVEABLE(Block);
82
62 Block() = default; 83 Block() = default;
84 ~Block() = default;
63 85
64 constexpr std::size_t GetShift() const { 86 constexpr std::size_t GetShift() const {
65 return block_shift; 87 return block_shift;
@@ -129,7 +151,6 @@ private:
129 return heap_address + (offset << GetShift()); 151 return heap_address + (offset << GetShift());
130 } 152 }
131 153
132 public:
133 static constexpr std::size_t CalculateManagementOverheadSize(std::size_t region_size, 154 static constexpr std::size_t CalculateManagementOverheadSize(std::size_t region_size,
134 std::size_t cur_block_shift, 155 std::size_t cur_block_shift,
135 std::size_t next_block_shift) { 156 std::size_t next_block_shift) {
@@ -139,35 +160,15 @@ private:
139 return KPageBitmap::CalculateManagementOverheadSize( 160 return KPageBitmap::CalculateManagementOverheadSize(
140 (align * 2 + Common::AlignUp(region_size, align)) / cur_block_size); 161 (align * 2 + Common::AlignUp(region_size, align)) / cur_block_size);
141 } 162 }
142 };
143
144public:
145 KPageHeap() = default;
146
147 constexpr VAddr GetAddress() const {
148 return heap_address;
149 }
150 constexpr std::size_t GetSize() const {
151 return heap_size;
152 }
153 constexpr VAddr GetEndAddress() const {
154 return GetAddress() + GetSize();
155 }
156 constexpr std::size_t GetPageOffset(VAddr block) const {
157 return (block - GetAddress()) / PageSize;
158 }
159 163
160 void Initialize(VAddr heap_address, std::size_t heap_size, std::size_t metadata_size); 164 private:
161 VAddr AllocateBlock(s32 index, bool random); 165 KPageBitmap bitmap;
162 void Free(VAddr addr, std::size_t num_pages); 166 VAddr heap_address{};
163 167 uintptr_t end_offset{};
164 void UpdateUsedSize() { 168 std::size_t block_shift{};
165 used_size = heap_size - (GetNumFreePages() * PageSize); 169 std::size_t next_block_shift{};
166 } 170 };
167
168 static std::size_t CalculateManagementOverheadSize(std::size_t region_size);
169 171
170private:
171 constexpr std::size_t GetNumFreePages() const { 172 constexpr std::size_t GetNumFreePages() const {
172 std::size_t num_free{}; 173 std::size_t num_free{};
173 174
@@ -180,6 +181,11 @@ private:
180 181
181 void FreeBlock(VAddr block, s32 index); 182 void FreeBlock(VAddr block, s32 index);
182 183
184 static constexpr std::size_t NumMemoryBlockPageShifts{7};
185 static constexpr std::array<std::size_t, NumMemoryBlockPageShifts> MemoryBlockPageShifts{
186 0xC, 0x10, 0x15, 0x16, 0x19, 0x1D, 0x1E,
187 };
188
183 VAddr heap_address{}; 189 VAddr heap_address{};
184 std::size_t heap_size{}; 190 std::size_t heap_size{};
185 std::size_t used_size{}; 191 std::size_t used_size{};
diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp
index 2ebbc0819..393214082 100644
--- a/src/core/hle/kernel/k_page_table.cpp
+++ b/src/core/hle/kernel/k_page_table.cpp
@@ -63,6 +63,8 @@ constexpr std::size_t GetSizeInRange(const KMemoryInfo& info, VAddr start, VAddr
63 63
64KPageTable::KPageTable(Core::System& system_) : system{system_} {} 64KPageTable::KPageTable(Core::System& system_) : system{system_} {}
65 65
66KPageTable::~KPageTable() = default;
67
66ResultCode KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_type, 68ResultCode KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_type,
67 bool enable_aslr, VAddr code_addr, 69 bool enable_aslr, VAddr code_addr,
68 std::size_t code_size, KMemoryManager::Pool pool) { 70 std::size_t code_size, KMemoryManager::Pool pool) {
diff --git a/src/core/hle/kernel/k_page_table.h b/src/core/hle/kernel/k_page_table.h
index 60ae9b9e8..ecae939a0 100644
--- a/src/core/hle/kernel/k_page_table.h
+++ b/src/core/hle/kernel/k_page_table.h
@@ -7,6 +7,7 @@
7#include <memory> 7#include <memory>
8#include <mutex> 8#include <mutex>
9 9
10#include "common/common_funcs.h"
10#include "common/common_types.h" 11#include "common/common_types.h"
11#include "common/page_table.h" 12#include "common/page_table.h"
12#include "core/file_sys/program_metadata.h" 13#include "core/file_sys/program_metadata.h"
@@ -22,9 +23,13 @@ namespace Kernel {
22 23
23class KMemoryBlockManager; 24class KMemoryBlockManager;
24 25
25class KPageTable final : NonCopyable { 26class KPageTable final {
26public: 27public:
28 YUZU_NON_COPYABLE(KPageTable);
29 YUZU_NON_MOVEABLE(KPageTable);
30
27 explicit KPageTable(Core::System& system_); 31 explicit KPageTable(Core::System& system_);
32 ~KPageTable();
28 33
29 ResultCode InitializeForProcess(FileSys::ProgramAddressSpaceType as_type, bool enable_aslr, 34 ResultCode InitializeForProcess(FileSys::ProgramAddressSpaceType as_type, bool enable_aslr,
30 VAddr code_addr, std::size_t code_size, 35 VAddr code_addr, std::size_t code_size,
diff --git a/src/core/hle/kernel/k_slab_heap.h b/src/core/hle/kernel/k_slab_heap.h
index 0ad74b0a0..05c0bec9c 100644
--- a/src/core/hle/kernel/k_slab_heap.h
+++ b/src/core/hle/kernel/k_slab_heap.h
@@ -7,6 +7,7 @@
7#include <atomic> 7#include <atomic>
8 8
9#include "common/assert.h" 9#include "common/assert.h"
10#include "common/common_funcs.h"
10#include "common/common_types.h" 11#include "common/common_types.h"
11 12
12namespace Kernel { 13namespace Kernel {
@@ -15,13 +16,17 @@ class KernelCore;
15 16
16namespace impl { 17namespace impl {
17 18
18class KSlabHeapImpl final : NonCopyable { 19class KSlabHeapImpl final {
19public: 20public:
21 YUZU_NON_COPYABLE(KSlabHeapImpl);
22 YUZU_NON_MOVEABLE(KSlabHeapImpl);
23
20 struct Node { 24 struct Node {
21 Node* next{}; 25 Node* next{};
22 }; 26 };
23 27
24 constexpr KSlabHeapImpl() = default; 28 constexpr KSlabHeapImpl() = default;
29 constexpr ~KSlabHeapImpl() = default;
25 30
26 void Initialize(std::size_t size) { 31 void Initialize(std::size_t size) {
27 ASSERT(head == nullptr); 32 ASSERT(head == nullptr);
@@ -64,9 +69,13 @@ private:
64 69
65} // namespace impl 70} // namespace impl
66 71
67class KSlabHeapBase : NonCopyable { 72class KSlabHeapBase {
68public: 73public:
74 YUZU_NON_COPYABLE(KSlabHeapBase);
75 YUZU_NON_MOVEABLE(KSlabHeapBase);
76
69 constexpr KSlabHeapBase() = default; 77 constexpr KSlabHeapBase() = default;
78 constexpr ~KSlabHeapBase() = default;
70 79
71 constexpr bool Contains(uintptr_t addr) const { 80 constexpr bool Contains(uintptr_t addr) const {
72 return start <= addr && addr < end; 81 return start <= addr && addr < end;