Revert "Memory Changes"

This reverts commit d5c9bc662c.

Solves crash in Kirby Star Allies after a few mins of gameplay, possibly other titles.
This commit is contained in:
KeatonTheBot
2025-08-17 00:19:01 -05:00
parent 7fd01214cf
commit 48c809a80d
17 changed files with 736 additions and 1583 deletions
@@ -89,19 +89,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
if (baseAddress > currBaseAddr)
{
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(baseAddress);
if (currBlock.Left == null)
_blockTree.Add(newBlock, currBlock);
else
_blockTree.Add(newBlock, currBlock.Predecessor);
_blockTree.Add(newBlock);
}
if (endAddr < currEndAddr)
{
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(endAddr);
if (currBlock.Left == null)
_blockTree.Add(newBlock, currBlock);
else
_blockTree.Add(newBlock, currBlock.Predecessor);
_blockTree.Add(newBlock);
currBlock = newBlock;
}
@@ -149,19 +143,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
if (baseAddress > currBaseAddr)
{
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(baseAddress);
if (currBlock.Left == null)
_blockTree.Add(newBlock, currBlock);
else
_blockTree.Add(newBlock, currBlock.Predecessor);
_blockTree.Add(newBlock);
}
if (endAddr < currEndAddr)
{
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(endAddr);
if (currBlock.Left == null)
_blockTree.Add(newBlock, currBlock);
else
_blockTree.Add(newBlock, currBlock.Predecessor);
_blockTree.Add(newBlock);
currBlock = newBlock;
}
@@ -211,19 +199,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
if (baseAddress > currBaseAddr)
{
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(baseAddress);
if (currBlock.Left == null)
_blockTree.Add(newBlock, currBlock);
else
_blockTree.Add(newBlock, currBlock.Predecessor);
_blockTree.Add(newBlock);
}
if (endAddr < currEndAddr)
{
KMemoryBlock newBlock = currBlock.SplitRightAtAddress(endAddr);
if (currBlock.Left == null)
_blockTree.Add(newBlock, currBlock);
else
_blockTree.Add(newBlock, currBlock.Predecessor);
_blockTree.Add(newBlock);
currBlock = newBlock;
}