Clear JIT cache on exit (#1518)
* Initial cache memory allocator implementation * Get rid of CallFlag * Perform cache cleanup on exit * Basic cache invalidation * Thats not how conditionals works in C# it seems * Set PTC version to PR number * Address PR feedback * Update InstEmitFlowHelper.cs * Flag clear on address is no longer needed * Do not include exit block in function size calculation * Dispose jump table * For future use * InternalVersion = 1519 (force retest). Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
This commit is contained in:
parent
11222516c4
commit
61634dd415
24 changed files with 827 additions and 357 deletions
|
@ -40,6 +40,8 @@ namespace Ryujinx.Cpu
|
|||
|
||||
public MemoryTracking Tracking { get; }
|
||||
|
||||
internal event Action<ulong, ulong> UnmapEvent;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the memory manager.
|
||||
/// </summary>
|
||||
|
@ -100,6 +102,14 @@ namespace Ryujinx.Cpu
|
|||
/// <param name="size">Size of the range to be unmapped</param>
|
||||
public void Unmap(ulong va, ulong size)
|
||||
{
|
||||
// If size is 0, there's nothing to unmap, just exit early.
|
||||
if (size == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UnmapEvent?.Invoke(va, size);
|
||||
|
||||
ulong remainingSize = size;
|
||||
ulong oVa = va;
|
||||
while (remainingSize != 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue