diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-12 03:48:02 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-02-19 01:16:24 +0100 |
commit | 6a19086001b5d7229728199d074b72c1d0dd34af (patch) | |
tree | 73091c9902c03d909ae9ba2e9667332811e40c96 /src/core/hle/kernel/memory/memory_manager.cpp | |
parent | hle: kernel: Add KPageBitmap class. (diff) | |
download | yuzu-6a19086001b5d7229728199d074b72c1d0dd34af.tar yuzu-6a19086001b5d7229728199d074b72c1d0dd34af.tar.gz yuzu-6a19086001b5d7229728199d074b72c1d0dd34af.tar.bz2 yuzu-6a19086001b5d7229728199d074b72c1d0dd34af.tar.lz yuzu-6a19086001b5d7229728199d074b72c1d0dd34af.tar.xz yuzu-6a19086001b5d7229728199d074b72c1d0dd34af.tar.zst yuzu-6a19086001b5d7229728199d074b72c1d0dd34af.zip |
Diffstat (limited to 'src/core/hle/kernel/memory/memory_manager.cpp')
-rw-r--r-- | src/core/hle/kernel/memory/memory_manager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/memory/memory_manager.cpp b/src/core/hle/kernel/memory/memory_manager.cpp index 77f135cdc..c373d9947 100644 --- a/src/core/hle/kernel/memory/memory_manager.cpp +++ b/src/core/hle/kernel/memory/memory_manager.cpp @@ -21,7 +21,7 @@ std::size_t MemoryManager::Impl::Initialize(Pool new_pool, u64 start_address, u6 const auto ref_count_size{(size / PageSize) * sizeof(u16)}; const auto optimize_map_size{(Common::AlignUp((size / PageSize), 64) / 64) * sizeof(u64)}; const auto manager_size{Common::AlignUp(optimize_map_size + ref_count_size, PageSize)}; - const auto page_heap_size{PageHeap::CalculateMetadataOverheadSize(size)}; + const auto page_heap_size{PageHeap::CalculateManagementOverheadSize(size)}; const auto total_metadata_size{manager_size + page_heap_size}; ASSERT(manager_size <= total_metadata_size); ASSERT(Common::IsAligned(total_metadata_size, PageSize)); @@ -63,7 +63,7 @@ VAddr MemoryManager::AllocateContinuous(std::size_t num_pages, std::size_t align // Loop, trying to iterate from each block // TODO (bunnei): Support multiple managers Impl& chosen_manager{managers[pool_index]}; - VAddr allocated_block{chosen_manager.AllocateBlock(heap_index)}; + VAddr allocated_block{chosen_manager.AllocateBlock(heap_index, false)}; // If we failed to allocate, quit now if (!allocated_block) { @@ -116,7 +116,7 @@ ResultCode MemoryManager::Allocate(PageLinkedList& page_list, std::size_t num_pa while (num_pages >= pages_per_alloc) { // Allocate a block - VAddr allocated_block{chosen_manager.AllocateBlock(index)}; + VAddr allocated_block{chosen_manager.AllocateBlock(index, false)}; if (!allocated_block) { break; } |