[Kernel] Use single page to store all Vd pointers and structs

This is to prevent some titles from reaching out of memory crash
This commit is contained in:
Gliniak
2026-06-17 22:56:54 +02:00
committed by Radosław Gliński
parent e7d0e45095
commit b268292046
2 changed files with 18 additions and 11 deletions

View File

@@ -284,10 +284,16 @@ bool Memory::Initialize() {
heaps_.vA0000000.Alloc(0x340000, 64 * 1024, kMemoryAllocationReserve,
kMemoryProtectNoAccess, true, &unk_phys_alloc);
uint32_t unknown_xex_range; // Probably hypervisor?
// Allocate memory hypervisor and kernel would use
uint32_t hypervisor_range;
heaps_.v80000000.Alloc(0x40000, 4 * 1024, kMemoryAllocationCommit,
kMemoryProtectRead | kMemoryProtectWrite, false,
&unknown_xex_range);
&hypervisor_range);
uint32_t kernel_range;
heaps_.v80000000.Alloc(0x1C0000, 4 * 1024, kMemoryAllocationCommit,
kMemoryProtectRead | kMemoryProtectWrite, false,
&kernel_range);
// Value taken from 544307D5. Title explicitly access this address and this is
// a value underneath it (It's constant between multiple runs)