diff options
author | bunnei <bunneidev@gmail.com> | 2021-03-24 02:37:39 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-03-24 02:37:39 +0100 |
commit | 4eac8703d23be2b3ddfab36d93608c2398bbaa0a (patch) | |
tree | bfb6eb983e0c371445a62bbd83486db41cac5d39 /src | |
parent | hle: kernel: k_memory_layout: Use pair instead of tuple. (diff) | |
download | yuzu-4eac8703d23be2b3ddfab36d93608c2398bbaa0a.tar yuzu-4eac8703d23be2b3ddfab36d93608c2398bbaa0a.tar.gz yuzu-4eac8703d23be2b3ddfab36d93608c2398bbaa0a.tar.bz2 yuzu-4eac8703d23be2b3ddfab36d93608c2398bbaa0a.tar.lz yuzu-4eac8703d23be2b3ddfab36d93608c2398bbaa0a.tar.xz yuzu-4eac8703d23be2b3ddfab36d93608c2398bbaa0a.tar.zst yuzu-4eac8703d23be2b3ddfab36d93608c2398bbaa0a.zip |
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: KMemoryRegionAllocator& memory_region_allocator; public: - KMemoryRegionTree(KMemoryRegionAllocator& memory_region_allocator_); + explicit KMemoryRegionTree(KMemoryRegionAllocator& memory_region_allocator_); public: KMemoryRegion* FindModifiable(u64 address) { @@ -328,14 +328,8 @@ class KMemoryRegionAllocator final : NonCopyable { public: static constexpr size_t MaxMemoryRegions = 200; -private: - std::array<KMemoryRegion, MaxMemoryRegions> region_heap{}; - size_t num_regions{}; - -public: constexpr KMemoryRegionAllocator() = default; -public: template <typename... Args> KMemoryRegion* Allocate(Args&&... args) { // Ensure we stay within the bounds of our heap. @@ -347,6 +341,10 @@ public: return region; } + +private: + std::array<KMemoryRegion, MaxMemoryRegions> region_heap{}; + size_t num_regions{}; }; } // namespace Kernel |