Make JIT cache non-static
See original GitHub issueImprovement Suggestion
What improvement are you suggesting?
Overview:
On the CPU (ARMeilleure project), the JitCache is responsible for storing the JIT generated code. Currently it is static and has a 2GB region reserved for code of all Translator instances. It should be made non-static, and a instance of the cache should be stored per Translator instance.
This way, we don’t run out of reserved memory if we have multiple Translator instances. Additionally, it makes disposal simpler as one can just dispose the entire cache when the translator is disposed, and the memory can be reclaimed by the OS.
I expect this to be fairly easy to do overall, but it requires the removal of the unwinder that is registered on windows to handle the unwinding of JIT generated functions. See: https://github.com/Ryujinx/Ryujinx/blob/5e724cf24e3d696b95be859c055a617e5d37bf80/ARMeilleure/Translation/JitUnwindWindows.cs#L62
I’m not sure if windows allows removing it, so peharps this part of the code should be kept static.
For anyone interested, I have started some work on this, but I am not working on it right now (and don’t plan to anytime soon), I can make the code available somewhere.
Nature of Request:
Fix/refactoring.
Why would this feature be useful?
Avoids out of memory errors with multiple translators, makes disposal simpler.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)

 Top Related Medium Post
Top Related Medium Post Top Related StackOverflow Question
Top Related StackOverflow Question
Let me challenge this. There are concerns because this is my very first attempt to contribute to an OSS project. But I’ll manage to do it somehow.
@Twilight-Struggle Any progress? I see no movement on this issue for over 2 years…