aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs')
-rw-r--r--Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs b/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs
index ab43b477..857be7a6 100644
--- a/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs
+++ b/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs
@@ -2447,9 +2447,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
{
ulong endAddr = address + size;
- LinkedListNode<KMemoryBlock> node = _blockManager.FindBlockNode(address);
+ KMemoryBlock currBlock = _blockManager.FindBlock(address);
- KMemoryInfo info = node.Value.GetInfo();
+ KMemoryInfo info = currBlock.GetInfo();
MemoryState firstState = info.State;
KMemoryPermission firstPermission = info.Permission;
@@ -2457,7 +2457,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
do
{
- info = node.Value.GetInfo();
+ info = currBlock.GetInfo();
// Check if the block state matches what we expect.
if (firstState != info.State ||
@@ -2474,7 +2474,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
return false;
}
}
- while (info.Address + info.Size - 1 < endAddr - 1 && (node = node.Next) != null);
+ while (info.Address + info.Size - 1 < endAddr - 1 && (currBlock = currBlock.Successor) != null);
outState = firstState;
outPermission = firstPermission;
@@ -2509,17 +2509,17 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
private IEnumerable<KMemoryInfo> IterateOverRange(ulong start, ulong end)
{
- LinkedListNode<KMemoryBlock> node = _blockManager.FindBlockNode(start);
+ KMemoryBlock currBlock = _blockManager.FindBlock(start);
KMemoryInfo info;
do
{
- info = node.Value.GetInfo();
+ info = currBlock.GetInfo();
yield return info;
}
- while (info.Address + info.Size - 1 < end - 1 && (node = node.Next) != null);
+ while (info.Address + info.Size - 1 < end - 1 && (currBlock = currBlock.Successor) != null);
}
private ulong AllocateVa(ulong regionStart, ulong regionPagesCount, ulong neededPagesCount, int alignment)
@@ -2605,9 +2605,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
ulong regionEndAddr = regionStart + regionPagesCount * PageSize;
- LinkedListNode<KMemoryBlock> node = _blockManager.FindBlockNode(regionStart);
+ KMemoryBlock currBlock = _blockManager.FindBlock(regionStart);
- KMemoryInfo info = node.Value.GetInfo();
+ KMemoryInfo info = currBlock.GetInfo();
while (regionEndAddr >= info.Address)
{
@@ -2636,14 +2636,14 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
}
}
- node = node.Next;
+ currBlock = currBlock.Successor;
- if (node == null)
+ if (currBlock == null)
{
break;
}
- info = node.Value.GetInfo();
+ info = currBlock.GetInfo();
}
return 0;