mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-09 17:48:56 +02:00
Revert "misc: chore: Remove redundant code"
This reverts commit 05a88ccc94.
This commit is contained in:
@@ -4,8 +4,7 @@ using System.Runtime.Versioning;
|
||||
namespace Ryujinx.Cpu.AppleHv
|
||||
{
|
||||
[SupportedOSPlatform("macos")]
|
||||
class HvMemoryBlockAllocator(HvIpaAllocator ipaAllocator, ulong blockAlignment)
|
||||
: PrivateMemoryAllocatorImpl<HvMemoryBlockAllocator.Block>(blockAlignment, MemoryAllocationFlags.None)
|
||||
class HvMemoryBlockAllocator : PrivateMemoryAllocatorImpl<HvMemoryBlockAllocator.Block>
|
||||
{
|
||||
public class Block : PrivateMemoryAllocator.Block
|
||||
{
|
||||
@@ -37,6 +36,13 @@ namespace Ryujinx.Cpu.AppleHv
|
||||
}
|
||||
}
|
||||
|
||||
private readonly HvIpaAllocator _ipaAllocator;
|
||||
|
||||
public HvMemoryBlockAllocator(HvIpaAllocator ipaAllocator, ulong blockAlignment) : base(blockAlignment, MemoryAllocationFlags.None)
|
||||
{
|
||||
_ipaAllocator = ipaAllocator;
|
||||
}
|
||||
|
||||
public HvMemoryBlockAllocation Allocate(ulong size, ulong alignment)
|
||||
{
|
||||
var allocation = Allocate(size, alignment, CreateBlock);
|
||||
@@ -46,7 +52,7 @@ namespace Ryujinx.Cpu.AppleHv
|
||||
|
||||
private Block CreateBlock(MemoryBlock memory, ulong size)
|
||||
{
|
||||
return new Block(ipaAllocator, memory, size);
|
||||
return new Block(_ipaAllocator, memory, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using Ryujinx.Memory.Tracking;
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Ryujinx.Cpu.AppleHv
|
||||
{
|
||||
private const ulong InterruptIntervalNs = 16 * 1000000; // 16 ms
|
||||
|
||||
private static ulong _interruptTimeDeltaTicks;
|
||||
private static ulong _interruptTimeDeltaTicks = 0;
|
||||
|
||||
public readonly ulong Handle;
|
||||
public readonly HvVcpuExit* ExitInfo;
|
||||
|
||||
Reference in New Issue
Block a user