mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-10 18:49:57 +00:00
shader_jit_x64: Free memory that's no longer needed after compilation.
This commit is contained in:
parent
60aa72e117
commit
847fb951e2
1 changed files with 6 additions and 0 deletions
|
@ -845,6 +845,12 @@ void JitCompiler::Compile() {
|
||||||
SetJumpTarget(branch.first, code_ptr[branch.second]);
|
SetJumpTarget(branch.first, code_ptr[branch.second]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Free memory that's no longer needed
|
||||||
|
return_offsets.clear();
|
||||||
|
return_offsets.shrink_to_fit();
|
||||||
|
fixup_branches.clear();
|
||||||
|
fixup_branches.shrink_to_fit();
|
||||||
|
|
||||||
uintptr_t size = reinterpret_cast<uintptr_t>(GetCodePtr()) - reinterpret_cast<uintptr_t>(program);
|
uintptr_t size = reinterpret_cast<uintptr_t>(GetCodePtr()) - reinterpret_cast<uintptr_t>(program);
|
||||||
ASSERT_MSG(size <= MAX_SHADER_SIZE, "Compiled a shader that exceeds the allocated size!");
|
ASSERT_MSG(size <= MAX_SHADER_SIZE, "Compiled a shader that exceeds the allocated size!");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue