mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
PPU: fix leak when precompiling SELF files
This commit is contained in:
parent
506ec0f947
commit
39910885d9
1 changed files with 3 additions and 4 deletions
|
@ -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));
|
fmt::append(cache_path, "ppu-%s-%s/", fmt::base57(info.sha1), info.path.substr(info.path.find_last_of('/') + 1));
|
||||||
|
|
||||||
#ifdef LLVM_AVAILABLE
|
#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
|
#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
|
obj.clear(), src.close(); // Clear decrypted file and elf object memory
|
||||||
|
|
||||||
ppu_initialize(_main);
|
|
||||||
|
|
||||||
_main.name = ' '; // Make ppu_finalize work
|
_main.name = ' '; // Make ppu_finalize work
|
||||||
|
ppu_initialize(_main);
|
||||||
ppu_finalize(_main);
|
ppu_finalize(_main);
|
||||||
_main = {};
|
_main = {};
|
||||||
break;
|
break;
|
||||||
|
@ -3872,7 +3871,7 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Permanently loaded compiled PPU modules (name -> data)
|
// 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)
|
// Compiler instance (deferred initialization)
|
||||||
std::shared_ptr<jit_compiler>& jit = jit_mod.pjit;
|
std::shared_ptr<jit_compiler>& jit = jit_mod.pjit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue