mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-04-30 10:32:54 +00:00
Memory Changes (ryubing/ryujinx!46)
See merge request ryubing/ryujinx!46
This commit is contained in:
@@ -89,13 +89,19 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
||||
if (baseAddress > currBaseAddr)
|
||||
{
|
||||
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(baseAddress);
|
||||
_blockTree.Add(newBlock);
|
||||
if (currBlock.Left == null)
|
||||
_blockTree.Add(newBlock, currBlock);
|
||||
else
|
||||
_blockTree.Add(newBlock, currBlock.Predecessor);
|
||||
}
|
||||
|
||||
if (endAddr < currEndAddr)
|
||||
{
|
||||
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(endAddr);
|
||||
_blockTree.Add(newBlock);
|
||||
if (currBlock.Left == null)
|
||||
_blockTree.Add(newBlock, currBlock);
|
||||
else
|
||||
_blockTree.Add(newBlock, currBlock.Predecessor);
|
||||
currBlock = newBlock;
|
||||
}
|
||||
|
||||
@@ -143,13 +149,19 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
||||
if (baseAddress > currBaseAddr)
|
||||
{
|
||||
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(baseAddress);
|
||||
_blockTree.Add(newBlock);
|
||||
if (currBlock.Left == null)
|
||||
_blockTree.Add(newBlock, currBlock);
|
||||
else
|
||||
_blockTree.Add(newBlock, currBlock.Predecessor);
|
||||
}
|
||||
|
||||
if (endAddr < currEndAddr)
|
||||
{
|
||||
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(endAddr);
|
||||
_blockTree.Add(newBlock);
|
||||
if (currBlock.Left == null)
|
||||
_blockTree.Add(newBlock, currBlock);
|
||||
else
|
||||
_blockTree.Add(newBlock, currBlock.Predecessor);
|
||||
currBlock = newBlock;
|
||||
}
|
||||
|
||||
@@ -199,13 +211,19 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
||||
if (baseAddress > currBaseAddr)
|
||||
{
|
||||
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(baseAddress);
|
||||
_blockTree.Add(newBlock);
|
||||
if (currBlock.Left == null)
|
||||
_blockTree.Add(newBlock, currBlock);
|
||||
else
|
||||
_blockTree.Add(newBlock, currBlock.Predecessor);
|
||||
}
|
||||
|
||||
if (endAddr < currEndAddr)
|
||||
{
|
||||
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(endAddr);
|
||||
_blockTree.Add(newBlock);
|
||||
if (currBlock.Left == null)
|
||||
_blockTree.Add(newBlock, currBlock);
|
||||
else
|
||||
_blockTree.Add(newBlock, currBlock.Predecessor);
|
||||
currBlock = newBlock;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user