Commit Graph
3 Commits
Author SHA1 Message Date
klosixgaming-arch e21aa4cabd perf(libc): skip never-written pages when evicting a resident direct-memory run
Evicting a resident run read every 16 KiB page to find the written ones. On Windows, reading a committed page that was never touched faults in a zeroed page, and 97% of the pages the game releases were never written, so the scan took 2.9 us per page and most of the time the guest-allocation lock was held (Soul Hackers 2: 7.1 s of every 10 s). While the run is write-watched, no collection has cleared the watch and no host import touched it, GetWriteWatch lists the only pages that can be non-zero, so only those are read. Runs that fail any of those conditions are scanned as before.
2026-10-28 07:06:29 -05:00
Evgeniy KazarinandClaude Opus 5.5 b5bb956530 test(libc): link the resident release test and keep its valid case in one run
The test throws exceptions but did not link libc, so with
-fno-asynchronous-unwind-tables it failed to link (no __gxx_personality_v0)
on the supported WinLibs toolchain; the Windows CI job does not run on pull
requests. The valid case now maps 2 MiB at a 2-MiB boundary, so the mapping is
one resident run and both Reset calls take the exact-run path, and the test
requires that run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 08:30:15 +08:00
Evgeniy Kazarin 7c345db5a5 fix(libc): validate resident allocations before release 2026-10-18 09:14:12 -04:00