diff options
| author | gdk <gab.dark.100@gmail.com> | 2022-08-30 22:26:40 -0300 |
|---|---|---|
| committer | Mary-nyan <thog@protonmail.com> | 2022-09-10 16:23:49 +0200 |
| commit | 7dd69f2d0e314b2969d88089559815ed84acbac4 (patch) | |
| tree | 64dc59ff50f0fe4b8365fe70b2cbade27dd508f1 /Ryujinx.Memory/WindowsShared/PlaceholderManager.cs | |
| parent | c646638680f9b2dcc055ffbb280e970fcfe93aab (diff) | |
Allocation free tree lookup
Diffstat (limited to 'Ryujinx.Memory/WindowsShared/PlaceholderManager.cs')
| -rw-r--r-- | Ryujinx.Memory/WindowsShared/PlaceholderManager.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Ryujinx.Memory/WindowsShared/PlaceholderManager.cs b/Ryujinx.Memory/WindowsShared/PlaceholderManager.cs index 8624f817..a17fea5e 100644 --- a/Ryujinx.Memory/WindowsShared/PlaceholderManager.cs +++ b/Ryujinx.Memory/WindowsShared/PlaceholderManager.cs @@ -1,3 +1,4 @@ +using Ryujinx.Common.Collections; using Ryujinx.Common.Memory.PartialUnmaps; using System; using System.Diagnostics; @@ -88,7 +89,7 @@ namespace Ryujinx.Memory.WindowsShared lock (_mappings) { - RangeNode<ulong> node = _mappings.GetNode(new RangeNode<ulong>(address, address + 1UL, default)); + RangeNode<ulong> node = _mappings.GetNodeByKey(address); RangeNode<ulong> successorNode; for (; node != null; node = successorNode) @@ -379,7 +380,7 @@ namespace Ryujinx.Memory.WindowsShared lock (_mappings) { - RangeNode<ulong> node = _mappings.GetNode(new RangeNode<ulong>(address, address + 1UL, default)); + RangeNode<ulong> node = _mappings.GetNodeByKey(address); if (node == null) { @@ -481,7 +482,7 @@ namespace Ryujinx.Memory.WindowsShared lock (_mappings) { - RangeNode<ulong> node = _mappings.GetNode(new RangeNode<ulong>(reprotectAddress, reprotectAddress + 1UL, default)); + RangeNode<ulong> node = _mappings.GetNodeByKey(reprotectAddress); RangeNode<ulong> successorNode; for (; node != null; node = successorNode) @@ -580,7 +581,7 @@ namespace Ryujinx.Memory.WindowsShared lock (_protections) { - RangeNode<MemoryPermission> node = _protections.GetNode(new RangeNode<MemoryPermission>(address, address + 1UL, default)); + RangeNode<MemoryPermission> node = _protections.GetNodeByKey(address); if (node != null && node.Start <= address && @@ -651,7 +652,7 @@ namespace Ryujinx.Memory.WindowsShared lock (_protections) { - RangeNode<MemoryPermission> node = _protections.GetNode(new RangeNode<MemoryPermission>(address, address + 1UL, default)); + RangeNode<MemoryPermission> node = _protections.GetNodeByKey(address); RangeNode<MemoryPermission> successorNode; for (; node != null; node = successorNode) |
