mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 13:26:30 -05:00
hle: kernel: k_memory_region: Minor code cleanup.
This commit is contained in:
parent
9032d21365
commit
4eac8703d2
1 changed files with 5 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue