sharpemu/tests/SharpEmu.Libs.Tests/Memory/HostViews
kuba 1759e18b77
[Memory] Pre-reserve the guest address space on POSIX hosts (#905)
* [Memory] Reserve the guest address space again after an image reset

SelfLoader clears virtual memory before loading the eboot, which released the
startup pre-reservation of 0x10_0000_0000..0xFC_0000_0000. Every later large
reservation then had to probe the host address space candidate by candidate.

* [Memory] Pre-reserve the guest address space on POSIX hosts

POSIX had no ReserveFreeAddressRanges and cannot query foreign host mappings,
so TryHoldRangeAtOrAbove stepped through the address space one alignment unit
at a time. On macOS a 512 GiB reservation (all UE titles) took ~196k failed
mmap/munmap pairs before reaching free space, which the stall watchdog reported
as a hang in sceKernelReserveVirtualRange.

Find the free ranges by bisection, and use the first pre-reserved candidate
once a lower candidate fails.
2026-09-26 03:06:25 +03:00
..
HostViewMemoryTests.cs [Memory] Pre-reserve the guest address space on POSIX hosts (#905) 2026-09-26 03:06:25 +03:00
HostViewQueryTests.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
HostViewTestSupport.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00