Skip to content
Snippets Groups Projects
Commit 847fb951 authored by bunnei's avatar bunnei
Browse files

shader_jit_x64: Free memory that's no longer needed after compilation.

parent 60aa72e1
No related branches found
No related tags found
No related merge requests found
......@@ -845,6 +845,12 @@ void JitCompiler::Compile() {
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);
ASSERT_MSG(size <= MAX_SHADER_SIZE, "Compiled a shader that exceeds the allocated size!");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment