diff --git a/rpcs3/Emu/Cell/lv2/sys_vm.cpp b/rpcs3/Emu/Cell/lv2/sys_vm.cpp index 53d7efd939..2df52c2cc6 100644 --- a/rpcs3/Emu/Cell/lv2/sys_vm.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_vm.cpp @@ -3,11 +3,11 @@ #include "Emu/Cell/PPUThread.h" #include "Emu/Memory/vm_locking.h" -sys_vm_t::sys_vm_t(const std::shared_ptr& area, const std::shared_ptr& ct, u32 psize) +sys_vm_t::sys_vm_t(u32 _addr, u32 vsize, const std::shared_ptr& ct, u32 psize) : ct(ct) , psize(psize) - , addr(area->addr) - , size(area->size) + , addr(_addr) + , size(vsize) { // Write ID g_ids[addr >> 28].release(idm::last_id()); @@ -56,7 +56,7 @@ error_code sys_vm_memory_map(ppu_thread& ppu, u32 vsize, u32 psize, u32 cid, u64 // Alloc all memory (shall not fail) verify(HERE), area->alloc(vsize); - idm::make(area, ct, psize); + idm::make(area->addr, vsize, ct, psize); // Write a pointer for the allocated memory *addr = area->addr; diff --git a/rpcs3/Emu/Cell/lv2/sys_vm.h b/rpcs3/Emu/Cell/lv2/sys_vm.h index 0e3f75cab3..66e1fee7d7 100644 --- a/rpcs3/Emu/Cell/lv2/sys_vm.h +++ b/rpcs3/Emu/Cell/lv2/sys_vm.h @@ -41,7 +41,7 @@ struct sys_vm_t u32 psize; shared_mutex mutex; - sys_vm_t(const std::shared_ptr& area, const std::shared_ptr& ct, u32 psize); + sys_vm_t(u32 addr, u32 vsize, const std::shared_ptr& ct, u32 psize); ~sys_vm_t(); static std::array, id_count> g_ids;