diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_memory_manager.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/hle/kernel/k_memory_manager.cpp b/src/core/hle/kernel/k_memory_manager.cpp index a55db3088..5b0a9963a 100644 --- a/src/core/hle/kernel/k_memory_manager.cpp +++ b/src/core/hle/kernel/k_memory_manager.cpp @@ -11,7 +11,7 @@ #include "core/device_memory.h" #include "core/hle/kernel/initial_process.h" #include "core/hle/kernel/k_memory_manager.h" -#include "core/hle/kernel/k_page_linked_list.h" +#include "core/hle/kernel/k_page_group.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/svc_results.h" @@ -29,7 +29,7 @@ constexpr KMemoryManager::Pool GetPoolFromMemoryRegionType(u32 type) { } else if ((type | KMemoryRegionType_DramSystemNonSecurePool) == type) { return KMemoryManager::Pool::SystemNonSecure; } else { - UNREACHABLE_MSG("InvalidMemoryRegionType for conversion to Pool"); + ASSERT_MSG(false, "InvalidMemoryRegionType for conversion to Pool"); return {}; } } @@ -208,8 +208,8 @@ PAddr KMemoryManager::AllocateAndOpenContinuous(size_t num_pages, size_t align_p return allocated_block; } -ResultCode KMemoryManager::AllocatePageGroupImpl(KPageLinkedList* out, size_t num_pages, Pool pool, - Direction dir, bool random) { +Result KMemoryManager::AllocatePageGroupImpl(KPageGroup* out, size_t num_pages, Pool pool, + Direction dir, bool random) { // Choose a heap based on our page size request. const s32 heap_index = KPageHeap::GetBlockIndex(num_pages); R_UNLESS(0 <= heap_index, ResultOutOfMemory); @@ -257,7 +257,7 @@ ResultCode KMemoryManager::AllocatePageGroupImpl(KPageLinkedList* out, size_t nu return ResultSuccess; } -ResultCode KMemoryManager::AllocateAndOpen(KPageLinkedList* out, size_t num_pages, u32 option) { +Result KMemoryManager::AllocateAndOpen(KPageGroup* out, size_t num_pages, u32 option) { ASSERT(out != nullptr); ASSERT(out->GetNumPages() == 0); @@ -293,8 +293,8 @@ ResultCode KMemoryManager::AllocateAndOpen(KPageLinkedList* out, size_t num_page return ResultSuccess; } -ResultCode KMemoryManager::AllocateAndOpenForProcess(KPageLinkedList* out, size_t num_pages, - u32 option, u64 process_id, u8 fill_pattern) { +Result KMemoryManager::AllocateAndOpenForProcess(KPageGroup* out, size_t num_pages, u32 option, + u64 process_id, u8 fill_pattern) { ASSERT(out != nullptr); ASSERT(out->GetNumPages() == 0); @@ -370,12 +370,12 @@ void KMemoryManager::Close(PAddr address, size_t num_pages) { } } -void KMemoryManager::Close(const KPageLinkedList& pg) { +void KMemoryManager::Close(const KPageGroup& pg) { for (const auto& node : pg.Nodes()) { Close(node.GetAddress(), node.GetNumPages()); } } -void KMemoryManager::Open(const KPageLinkedList& pg) { +void KMemoryManager::Open(const KPageGroup& pg) { for (const auto& node : pg.Nodes()) { Open(node.GetAddress(), node.GetNumPages()); } |