Properly handle cases where the address space bits are too low
This commit is contained in:
parent
3f9f3d23d4
commit
9152288392
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
using Ryujinx.Memory;
|
||||
using Ryujinx.Memory.Tracking;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
|
||||
|
@ -34,7 +35,8 @@ namespace Ryujinx.Cpu
|
|||
|
||||
public ManagedPageFlags(int addressSpaceBits)
|
||||
{
|
||||
_pageBitmap = new ulong[1 << (addressSpaceBits - (PageBits + PageToPteShift))];
|
||||
int bits = Math.Max(0, addressSpaceBits - (PageBits + PageToPteShift));
|
||||
_pageBitmap = new ulong[1 << bits];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Reference in a new issue