Skip to content

Commit 95b0208

Browse files
committed
[DYNAREC] Made NOHOTPAGE=1 and DIRTY=2 combonaison to actualy do something
1 parent 12ba6c1 commit 95b0208

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/custommem.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,11 +2591,16 @@ void CheckHotPage(uintptr_t addr, uint32_t prot)
25912591
{
25922592
if(addr>=0x1000000000000LL) // more than 48bits
25932593
return;
2594-
if(prot&PROT_NEVERCLEAN && BOX64ENV(dynarec_dirty)==2)
2595-
return;
2596-
if(BOX64ENV(dynarec_nohotpage))
2594+
if((prot&PROT_NEVERCLEAN) && BOX64ENV(dynarec_dirty)==2)
25972595
return;
25982596
uintptr_t page = addr>>12;
2597+
if(BOX64ENV(dynarec_nohotpage)) {
2598+
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+
}
25992604
// look for idx
26002605
int idx = IdxHotPage(page);
26012606
if(idx!=-1 && (BOX64ENV(dynarec_dirty)>1)) {

0 commit comments

Comments
 (0)