diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_memory_region.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/hle/kernel/k_memory_region.h b/src/core/hle/kernel/k_memory_region.h index 782c21fbf..a861c04ab 100644 --- a/src/core/hle/kernel/k_memory_region.h +++ b/src/core/hle/kernel/k_memory_region.h | |||
| @@ -160,7 +160,7 @@ private: | |||
| 160 | KMemoryRegionAllocator& memory_region_allocator; | 160 | KMemoryRegionAllocator& memory_region_allocator; |
| 161 | 161 | ||
| 162 | public: | 162 | public: |
| 163 | KMemoryRegionTree(KMemoryRegionAllocator& memory_region_allocator_); | 163 | explicit KMemoryRegionTree(KMemoryRegionAllocator& memory_region_allocator_); |
| 164 | 164 | ||
| 165 | public: | 165 | public: |
| 166 | KMemoryRegion* FindModifiable(u64 address) { | 166 | KMemoryRegion* FindModifiable(u64 address) { |
| @@ -328,14 +328,8 @@ class KMemoryRegionAllocator final : NonCopyable { | |||
| 328 | public: | 328 | public: |
| 329 | static constexpr size_t MaxMemoryRegions = 200; | 329 | static constexpr size_t MaxMemoryRegions = 200; |
| 330 | 330 | ||
| 331 | private: | ||
| 332 | std::array<KMemoryRegion, MaxMemoryRegions> region_heap{}; | ||
| 333 | size_t num_regions{}; | ||
| 334 | |||
| 335 | public: | ||
| 336 | constexpr KMemoryRegionAllocator() = default; | 331 | constexpr KMemoryRegionAllocator() = default; |
| 337 | 332 | ||
| 338 | public: | ||
| 339 | template <typename... Args> | 333 | template <typename... Args> |
| 340 | KMemoryRegion* Allocate(Args&&... args) { | 334 | KMemoryRegion* Allocate(Args&&... args) { |
| 341 | // Ensure we stay within the bounds of our heap. | 335 | // Ensure we stay within the bounds of our heap. |
| @@ -347,6 +341,10 @@ public: | |||
| 347 | 341 | ||
| 348 | return region; | 342 | return region; |
| 349 | } | 343 | } |
| 344 | |||
| 345 | private: | ||
| 346 | std::array<KMemoryRegion, MaxMemoryRegions> region_heap{}; | ||
| 347 | size_t num_regions{}; | ||
| 350 | }; | 348 | }; |
| 351 | 349 | ||
| 352 | } // namespace Kernel | 350 | } // namespace Kernel |