Fix assert

This commit is contained in:
Gabriel A 2023-12-26 23:23:10 -03:00
parent 5cc0b317f9
commit f9ed8f860e

View File

@ -11,7 +11,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
{ {
private const int CodeAlignment = 4; // Bytes. private const int CodeAlignment = 4; // Bytes.
private const int SharedCacheSize = 2047 * 1024 * 1024; private const int SharedCacheSize = 2047 * 1024 * 1024;
private const int LocalCacheSize = 256 * 1024 * 1024; private const int LocalCacheSize = 128 * 1024 * 1024;
// How many calls to the same function we allow until we pad the shared cache to force the function to become available there // How many calls to the same function we allow until we pad the shared cache to force the function to become available there
// and allow the guest to take the fast path. // and allow the guest to take the fast path.
@ -149,7 +149,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
lock (_lock) lock (_lock)
{ {
if (!_pendingMap.Has(guestAddress)) if (!_pendingMap.Has(guestAddress) && !_translator.Functions.ContainsKey(guestAddress))
{ {
int funcOffset = _sharedCache.Allocate(code.Length); int funcOffset = _sharedCache.Allocate(code.Length);