diff options
author | bunnei <bunneidev@gmail.com> | 2022-12-28 23:28:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-28 23:28:31 +0100 |
commit | 60419dd35e8d6dec97ec12839b5b9910167315d2 (patch) | |
tree | 95b7ee20365996ee1b3aae93c254343b9b496181 /src/core/hle/kernel/k_memory_manager.cpp | |
parent | Merge pull request #9490 from ameerj/texture-cache-prealloc (diff) | |
parent | k_page_table: remove HACK_OpenPages/ClosePages (diff) | |
download | yuzu-60419dd35e8d6dec97ec12839b5b9910167315d2.tar yuzu-60419dd35e8d6dec97ec12839b5b9910167315d2.tar.gz yuzu-60419dd35e8d6dec97ec12839b5b9910167315d2.tar.bz2 yuzu-60419dd35e8d6dec97ec12839b5b9910167315d2.tar.lz yuzu-60419dd35e8d6dec97ec12839b5b9910167315d2.tar.xz yuzu-60419dd35e8d6dec97ec12839b5b9910167315d2.tar.zst yuzu-60419dd35e8d6dec97ec12839b5b9910167315d2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_memory_manager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_memory_manager.cpp b/src/core/hle/kernel/k_memory_manager.cpp index bd33571da..cd6ea388e 100644 --- a/src/core/hle/kernel/k_memory_manager.cpp +++ b/src/core/hle/kernel/k_memory_manager.cpp @@ -223,7 +223,7 @@ Result KMemoryManager::AllocatePageGroupImpl(KPageGroup* out, size_t num_pages, // Ensure that we don't leave anything un-freed. ON_RESULT_FAILURE { - for (const auto& it : out->Nodes()) { + for (const auto& it : *out) { auto& manager = this->GetManager(it.GetAddress()); const size_t node_num_pages = std::min<u64>( it.GetNumPages(), (manager.GetEndAddress() - it.GetAddress()) / PageSize); @@ -285,7 +285,7 @@ Result KMemoryManager::AllocateAndOpen(KPageGroup* out, size_t num_pages, u32 op m_has_optimized_process[static_cast<size_t>(pool)], true)); // Open the first reference to the pages. - for (const auto& block : out->Nodes()) { + for (const auto& block : *out) { PAddr cur_address = block.GetAddress(); size_t remaining_pages = block.GetNumPages(); while (remaining_pages > 0) { @@ -335,7 +335,7 @@ Result KMemoryManager::AllocateForProcess(KPageGroup* out, size_t num_pages, u32 // Perform optimized memory tracking, if we should. if (optimized) { // Iterate over the allocated blocks. - for (const auto& block : out->Nodes()) { + for (const auto& block : *out) { // Get the block extents. const PAddr block_address = block.GetAddress(); const size_t block_pages = block.GetNumPages(); @@ -391,7 +391,7 @@ Result KMemoryManager::AllocateForProcess(KPageGroup* out, size_t num_pages, u32 } } else { // Set all the allocated memory. - for (const auto& block : out->Nodes()) { + for (const auto& block : *out) { std::memset(m_system.DeviceMemory().GetPointer<void>(block.GetAddress()), fill_pattern, block.GetSize()); } |