about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-09-04 15:21:32 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-09-04 15:21:32 +0200
commita3f63a12f9102794ce1d94c972064f10a25e944b (patch)
tree03d227251c87b5edd9019a616783e27f21587c88 /src/include
parentb2dfe64ceaeffcec02c98f5c332f8f8e31180dbd (diff)
downloadbox64-a3f63a12f9102794ce1d94c972064f10a25e944b.tar.gz
box64-a3f63a12f9102794ce1d94c972064f10a25e944b.zip
[DYNAREC] Improve memory protection tracking (help #361)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/custommem.h5
1 files changed, 3 insertions, 2 deletions
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);