We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12ba6c1 commit 95b0208Copy full SHA for 95b0208
1 file changed
src/custommem.c
@@ -2591,11 +2591,16 @@ void CheckHotPage(uintptr_t addr, uint32_t prot)
2591
{
2592
if(addr>=0x1000000000000LL) // more than 48bits
2593
return;
2594
- if(prot&PROT_NEVERCLEAN && BOX64ENV(dynarec_dirty)==2)
2595
- return;
2596
- if(BOX64ENV(dynarec_nohotpage))
+ if((prot&PROT_NEVERCLEAN) && BOX64ENV(dynarec_dirty)==2)
2597
2598
uintptr_t page = addr>>12;
+ if(BOX64ENV(dynarec_nohotpage)) {
+ if(BOX64ENV(dynarec_dirty)==2) {
2599
+ dynarec_log(LOG_INFO, "Switching page at %p to NEVERCLEAN\n", (void*)(page<<12));
2600
+ neverprotectDB(page<<12, box64_pagesize, 2);
2601
+ }
2602
+ return;
2603
2604
// look for idx
2605
int idx = IdxHotPage(page);
2606
if(idx!=-1 && (BOX64ENV(dynarec_dirty)>1)) {
0 commit comments