Allow DRAM size to be increased from 4GB to 6GB (#2174)

* Allow DRAM size to be increased from 4GB to 6GB

* Add option on the UI
This commit is contained in:
gdkchan 2021-04-04 09:06:59 -03:00 committed by GitHub
parent 3bc107d491
commit 874540bb5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 278 additions and 144 deletions

View file

@ -51,7 +51,11 @@ namespace Ryujinx.HLE.HOS.Kernel
private long _processId;
private long _threadUid;
public KernelContext(Switch device, MemoryBlock memory)
public KernelContext(
Switch device,
MemoryBlock memory,
MemorySize memorySize,
MemoryArrange memoryArrange)
{
Device = device;
Memory = memory;
@ -64,9 +68,9 @@ namespace Ryujinx.HLE.HOS.Kernel
ResourceLimit = new KResourceLimit(this);
KernelInit.InitializeResourceLimit(ResourceLimit);
KernelInit.InitializeResourceLimit(ResourceLimit, memorySize);
MemoryRegions = KernelInit.GetMemoryRegions();
MemoryRegions = KernelInit.GetMemoryRegions(memorySize, memoryArrange);
LargeMemoryBlockAllocator = new KMemoryBlockAllocator(KernelConstants.MemoryBlockAllocatorSize * 2);
SmallMemoryBlockAllocator = new KMemoryBlockAllocator(KernelConstants.MemoryBlockAllocatorSize);