Rewinder - small fix to memory allocation limit.
This commit is contained in:
parent
2e737e66be
commit
0ca93f35ba
|
@ -221,10 +221,11 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
if (allocate)
|
||||
{
|
||||
if (size > Int32.MaxValue)
|
||||
const int MaxByteArraySize = 0x7FFFFFC7;
|
||||
if (size > MaxByteArraySize)
|
||||
{
|
||||
// I think we need .NET 4.5+ on x64 to allocate > 2GB
|
||||
size = Int32.MaxValue;
|
||||
// .NET won't let us allocate more than this in one array
|
||||
size = MaxByteArraySize;
|
||||
}
|
||||
|
||||
if (_overrideMemoryLimit != null)
|
||||
|
|
Loading…
Reference in New Issue