PCSX2 Documentation/PCSX2 EE Recompiler: Difference between revisions
PCSX2 Documentation/PCSX2 EE Recompiler (view source)
Revision as of 17:31, 16 November 2015
, 16 November 2015→Memory Protection
Line 73: | Line 73: | ||
The situation can occurred because of self-modifying code or due to a library linking (change memory pointer in RAM). | The situation can occurred because of self-modifying code or due to a library linking (change memory pointer in RAM). | ||
A naive implementation would be to instrument all write to detect corresponding block. However it will cost a big penalty for each memory write. Another one will be to check the content of the instruction block at each execution. Again slow. A more complex implementation will use the page fault signal handler mechanism to detect invalid write. Guess what, we choose the | A naive implementation would be to instrument all write to detect corresponding block. However it will cost a big penalty for each memory write. Another one will be to check the content of the instruction block at each execution. Again slow. A more complex implementation will use the page fault signal handler mechanism to detect invalid write. Guess what, we choose the latter. | ||
* '''<code>C++ function: void mmap_MarkCountedRamPage( u32 paddr )</code>''' | * '''<code>C++ function: void mmap_MarkCountedRamPage( u32 paddr )</code>''' |