refreshImports checked every live host import, failure and refusal
again at each guest allocation registry change. A title that maps
memory often (SuperTuxKart, ~1650 maps a second) paid a walk that grew
with the live imports: ~34 FPS with ~1.1 GiB of imports on RADV.
The import table now keeps a weak_ptr snapshot of the ranges it was
last checked against and diffs it with the new lease. Only imports
whose import window touches a changed span, and imports made since the
last refresh, are checked again. Every import is checked when the window
is 0 or the window or budget changed. SuperTuxKart's menu goes from
~34 to ~45 FPS with the same imports live.
USAGE.md's performance overlay section now gives F10's cycle (off, page
1, page 2, off) and ANYPS5_OVERLAY=2, a table with one row per line of
page 2 that names each source and the system it comes from, and what the
page costs: the trace totals it turns on while it shows, and the checks
and counters that run while the overlay is hidden or on page 1.
ENVIRONMENT.md's ANYPS5_OVERLAY row lists page 2.
A Windows conversion now fails when a code entry lies after the first
byte of a guest GS instruction that the TLS builder replaces with UD2.
The new debt entry names both messages, says that no option skips the
checks and that Linux output keeps the instruction, so a user who hits
the refusal knows which target to use.
XNU's poll never reports POLLPRI for out-of-band data, so a guest poll
that asks for it never sees the urgent byte: guest_poll aborts at the
OOB case and a title waiting on priority data would sleep to its
timeout.
On macOS the pending byte is read from SIOCATMARK, which reports it
without consuming it and has no descriptor limit, unlike the fd_set
probe this replaces. POLLRDBAND is set with POLLPRI as FreeBSD 11.4's
sopoll_generic does, and the wait takes the sliced path main already
uses for a kqueue wait, so it wakes on the next slice instead of at the
deadline.
recv(MSG_OOB | MSG_PEEK) was measured to consume the byte on macOS
27.0.1 and kevent with NOTE_OOB does not fire there, which is why the
probe is SIOCATMARK. The select and libSceNet poll paths still miss
urgent data on macOS and are recorded in the debt entry.
On Windows the UCRT drops a write that directly follows a read on an r+,
w+ or a+ stream: fputc and fprintf report success, fwrite returns 0 and
fputs returns EOF, all without the error indicator, and the file is left
unchanged, also after an fflush. On a stream open only for reading, fputc
after a read reports success as well.
Writes now first do what FreeBSD 11.4's __swsetup does: a stream open only
for reading fails with EBADF and sets the error indicator, and an update
stream that is reading drops its read buffer and ungetc data, clears end
of file and writes at the descriptor's offset. This covers fwrite, fputs,
fputc, putc_unlocked, fprintf, fprintf_s, fputwc, fputws, fwprintf,
fwprintf_s, puts and wprintf, and printf, vprintf and printf_s, which
write to standard output through PrintWindows and now return -1 there
instead of throwing.
Linux is unchanged: glibc writes at the stream position, which the libc
technical debt now records.