Repository navigation
Conversation
…aps it The split layout chose the guest allocator arena's address at startup (and told the GPU process) but mapped it only at the first guest allocation, so anything mapped in between (the malloc nano zone growing, dyld, a host library) could take it and leave the arena private. The chosen range is now held as a no-access reservation of the backing's owner, which the arena's view replaces; Clear holds it again at the same address. A hold that fails at selection probes again (up to 4 times) before the loud private-arena error.
📦 Build artifacts —
|
| Platform | Download |
|---|---|
| macOS (osx-x64) | sharpemu-osx-x64-59c029f |
| macOS app bundle (osx-x64) | sharpemu-osx-x64-app-59c029f |
From build run #568. Downloads require a GitHub login and expire after 90 days.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before submitting
Please read our contribution guidelines before opening a pull request:
➡️ CONTRIBUTING.md
By opening this pull request, you confirm that you have read and agree to follow the contribution guidelines.
Testing
No game was run (no games on the test machine).
What changed: PR #71 chose the split guest allocator arena's address at startup and told the GPU process, but the arena was mapped only at the first guest allocation. Anything mapped in between (the malloc nano zone growing, dyld, a host library) could take the range, and the arena then stayed private, so the GPU process could not see the VideoOut labels or HLE data in it. The mapping was lazy only because the guest allocator has been lazy since it was added (08b315b), long before the split;
Clearat each load also releases the arena. The chosen range is now held as a no-access reservation of the backing's owner from the moment it is chosen. The arena's view replaces that reservation at the first allocation, andClearholds the range again at the same address. If the hold fails at selection, the code probes and tries again, up to 4 times, and then logs the existing loud private-arena error. The address the GPU process is told and the address mapped stay the same. The protocol is unchanged.SplitGuestMemoryTests.AnArenaTakenBetweenSelectionAndFirstUseStaysBacked: something maps into the arena's range after selection and before first use (exact placement without overwrite, asmach_vm_allocatefixed does), once at startup and once afterClear. Without the change it fails with one arena map failure and a private arena. With the change the outsider cannot land and the arena stays backed. It replacesAnArenaThatCannotBeMappedAtFirstUseIsCountedAndPrivate, whose scenario (taken after selection) can no longer happen.MallocNanoZoneunset: 640 MB of 128-byte mallocs grew the zone upward from 0x600000000000 in contiguous 0x20000000 regions to 0x600280000000 (about 9.5 GiB of address space). With a page already mapped at 0x600020000000, the zone skipped that region and kept growing above it. The relocated arena (preferred + 1 TiB, 0x610000000000) would need roughly 60 GB of live small allocations before the zone reached it, and it is now held anyway.MallocNanoZoneunset (as a user launch): 9 runs (wakeping x5, tbbburst x4). 9 of 9 printed[VMEM] Split layout: 0x0000600000000000 is taken ...with the arena at 0x0000610000000000. 0 of 9 printed any "could not be mapped" or "could not be held" line. The GPU process connected with the guest allocator arena at 0x610000000000 in every run, all runs exited 0, and tbbburst printedverdict ok4 of 4.uvx reuse lint: compliant. Release build: 0 errors.dotnet test SharpEmu.slnx -c Release: 0 failures in all 12 test projects (Libs.Tests 12638 passed, 162 skipped; the knownSeatbeltSandboxProbeTestsaudio failure did not occur this time). The targeted run (SplitGuestMemoryTests,PhysicalVirtualMemory*,GuestSpaceOwner*): 93 passed, 0 failed.Checklist
By submitting this pull request, you confirm that:
CONTRIBUTING.md.N/A.N/A).