Skip to content

Commit

Permalink
Prevent log from showing negative JIT cache sizes (32bit-int overflow) (
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffyOMC authored Feb 15, 2025
1 parent 6b55d15 commit 855161b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ARMeilleure/Translation/Cache/JitCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private static int Allocate(int codeSize)

int newRegionNumber = _activeRegionIndex;

Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((long)(newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");

_cacheAllocator = new CacheMemoryAllocator(CacheSize);

Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private static int Allocate(int codeSize)

int newRegionNumber = _activeRegionIndex;

Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((long)(newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");

_cacheAllocator = new CacheMemoryAllocator(CacheSize);

Expand Down
6 changes: 3 additions & 3 deletions src/Ryujinx/Assets/locales.json
Original file line number Diff line number Diff line change
Expand Up @@ -4621,7 +4621,7 @@
"zh_CN": "繁体中文(推荐)",
"zh_TW": "正體中文 (建議)"
}
},
},
{
"ID": "SettingsTabSystemSystemLanguageSwedish",
"Translations": {
Expand All @@ -4646,7 +4646,7 @@
"zh_CN": "瑞典语",
"zh_TW": ""
}
},
},
{
"ID": "SettingsTabSystemSystemLanguageNorwegian",
"Translations": {
Expand Down Expand Up @@ -24073,4 +24073,4 @@
}
}
]
}
}

0 comments on commit 855161b

Please sign in to comment.