mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-28 00:18:23 +00:00
PPU: fix leak when precompiling SELF files
This commit is contained in:
parent
506ec0f947
commit
39910885d9
@ -3231,7 +3231,7 @@ extern void ppu_finalize(const ppu_module& info)
|
||||
fmt::append(cache_path, "ppu-%s-%s/", fmt::base57(info.sha1), info.path.substr(info.path.find_last_of('/') + 1));
|
||||
|
||||
#ifdef LLVM_AVAILABLE
|
||||
g_fxo->get<jit_module_manager>().remove(cache_path + info.name + "_" + std::to_string(std::bit_cast<usz>(info.segs[0].ptr)));
|
||||
g_fxo->get<jit_module_manager>().remove(cache_path + "_" + std::to_string(std::bit_cast<usz>(info.segs[0].ptr)));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -3588,9 +3588,8 @@ extern void ppu_precompile(std::vector<std::string>& dir_queue, std::vector<ppu_
|
||||
|
||||
obj.clear(), src.close(); // Clear decrypted file and elf object memory
|
||||
|
||||
ppu_initialize(_main);
|
||||
|
||||
_main.name = ' '; // Make ppu_finalize work
|
||||
ppu_initialize(_main);
|
||||
ppu_finalize(_main);
|
||||
_main = {};
|
||||
break;
|
||||
@ -3872,7 +3871,7 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
|
||||
};
|
||||
|
||||
// Permanently loaded compiled PPU modules (name -> data)
|
||||
jit_module& jit_mod = g_fxo->get<jit_module_manager>().get(cache_path + info.name + "_" + std::to_string(std::bit_cast<usz>(info.segs[0].ptr)));
|
||||
jit_module& jit_mod = g_fxo->get<jit_module_manager>().get(cache_path + "_" + std::to_string(std::bit_cast<usz>(info.segs[0].ptr)));
|
||||
|
||||
// Compiler instance (deferred initialization)
|
||||
std::shared_ptr<jit_compiler>& jit = jit_mod.pjit;
|
||||
|
Loading…
Reference in New Issue
Block a user