From a3f63a12f9102794ce1d94c972064f10a25e944b Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sun, 4 Sep 2022 15:21:32 +0200 Subject: [DYNAREC] Improve memory protection tracking (help #361) --- src/include/custommem.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/custommem.h b/src/include/custommem.h index dba8b1f8..c8a28fc5 100644 --- a/src/include/custommem.h +++ b/src/include/custommem.h @@ -35,7 +35,8 @@ uintptr_t getJumpTableAddress64(uintptr_t addr); #endif #define PROT_DYNAREC 0x80 -#define PROT_CUSTOM (PROT_DYNAREC) +#define PROT_DYNAREC_R 0x40 +#define PROT_CUSTOM (PROT_DYNAREC | PROT_DYNAREC_R) void updateProtection(uintptr_t addr, size_t size, uint32_t prot); void setProtection(uintptr_t addr, size_t size, uint32_t prot); @@ -44,7 +45,7 @@ uint32_t getProtection(uintptr_t addr); void loadProtectionFromMap(); #ifdef DYNAREC void protectDB(uintptr_t addr, size_t size); -void unprotectDB(uintptr_t addr, size_t size); +void unprotectDB(uintptr_t addr, size_t size, int mark); // if mark==0, the blocks are not marked as potentially dirty int isprotectedDB(uintptr_t addr, size_t size); #endif void* find32bitBlock(size_t size); -- cgit 1.4.1