mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-10-02 16:50:20 -07:00

* Add host tracked memory manager mode * Skipping flush is no longer needed * Formatting + revert unrelated change * LightningJit: Ensure that dest register is saved for load ops that do partial updates * avoid allocations when doing address space lookup Add missing improvement * IsRmwMemory -> IsPartialRegisterUpdateMemory * Ensure we iterate all private allocations in range * PR feedback and potential fixes * Simplified bridges a lot * Skip calling SignalMappingChanged if Guest is true * Late map bridge too * Force address masking for prefetch instructions * Reprotection for bridges * Move partition list validation to separate debug method * Move host tracked related classes to HostTracked folder * New HostTracked namespace * Move host tracked modes to the end of enum to avoid PPTC invalidation --------- Co-authored-by: riperiperi <rhy3756547@hotmail.com>
36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
using Ryujinx.Common.Collections;
|
|
using System;
|
|
|
|
namespace Ryujinx.Cpu.Jit.HostTracked
|
|
{
|
|
internal class AddressIntrusiveRedBlackTree<T> : IntrusiveRedBlackTree<T> where T : IntrusiveRedBlackTreeNode<T>, IComparable<T>, IComparable<ulong>
|
|
{
|
|
/// <summary>
|
|
/// Retrieve the node that is considered equal to the specified address by the comparator.
|
|
/// </summary>
|
|
/// <param name="address">Address to compare with</param>
|
|
/// <returns>Node that is equal to <paramref name="address"/></returns>
|
|
public T GetNode(ulong address)
|
|
{
|
|
T node = Root;
|
|
while (node != null)
|
|
{
|
|
int cmp = node.CompareTo(address);
|
|
if (cmp < 0)
|
|
{
|
|
node = node.Left;
|
|
}
|
|
else if (cmp > 0)
|
|
{
|
|
node = node.Right;
|
|
}
|
|
else
|
|
{
|
|
return node;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|