From 1cb48a7bd2efc606b3e659a2a8c5b95b8e2c2014 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 26 Nov 2021 10:30:00 -0800 Subject: [PATCH] softjit: Reduce jit pool size a bit. --- GPU/Software/DrawPixel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GPU/Software/DrawPixel.cpp b/GPU/Software/DrawPixel.cpp index f473a0279c..e81b8dc7c4 100644 --- a/GPU/Software/DrawPixel.cpp +++ b/GPU/Software/DrawPixel.cpp @@ -515,7 +515,8 @@ PixelJitCache::PixelJitCache() : fp(this) #endif { - AllocCodeSpace(1024 * 256 * 4); + // 256k should be plenty of space for plenty of variations. + AllocCodeSpace(1024 * 64 * 4); // Add some random code to "help" MSVC's buggy disassembler :( #if defined(_WIN32) && (PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64)) && !PPSSPP_PLATFORM(UWP) @@ -558,7 +559,7 @@ SingleFunc PixelJitCache::GetSingle(const PixelFuncID &id) { return it->second; } - // TODO: What should be the min size? Can we even hit this? + // x64 is typically 200-500 bytes, but let's be safe. if (GetSpaceLeft() < 65536) { Clear(); }