mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-08 09:00:48 +02:00
I noticed this cascade of mprotects when poking at Crypt of the Necrodancer, since it consistently is invalidating code. I saw us calling mprotect on the same page 32 times in a tight loop and thought surely this isn't FEX doing this. Turns out we were calling the callback after invalidating each thread. It should instead be done once at the end of invalidating the thread's caches while still holding the locks. Fixes this weird cascade of mprotects that equal the number of FEX threads.