about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorrajdakin <rajdakin@gmail.com>2024-01-13 08:45:52 +0100
committerGitHub <noreply@github.com>2024-01-13 08:45:52 +0100
commit71463476f6325bfebc2a497221a76b1f5b903626 (patch)
treef49bbf1866bfbfb9e53635fc28ceb42f82ad6563 /src/include
parent20b388c1d2fd6a1cfb3973838345175410f9fa71 (diff)
downloadbox64-71463476f6325bfebc2a497221a76b1f5b903626.tar.gz
box64-71463476f6325bfebc2a497221a76b1f5b903626.zip
[RBTREE] Reverted memory tracking to 32 bits (#1201)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/custommem.h10
-rw-r--r--src/include/rbtree.h13
2 files changed, 14 insertions, 9 deletions
diff --git a/src/include/custommem.h b/src/include/custommem.h
index 363c3274..38d63702 100644
--- a/src/include/custommem.h
+++ b/src/include/custommem.h
@@ -75,13 +75,13 @@ uintptr_t getJumpAddress64(uintptr_t addr);
 #define PROT_CUSTOM     (PROT_DYNAREC | PROT_DYNAREC_R | PROT_NOPROT)
 #define PROT_WAIT       0xFF
 
-void updateProtection(uintptr_t addr, size_t size, uint8_t prot);
-void setProtection(uintptr_t addr, size_t size, uint8_t prot);
-void setProtection_mmap(uintptr_t addr, size_t size, uint8_t prot);
-void setProtection_elf(uintptr_t addr, size_t size, uint8_t prot);
+void updateProtection(uintptr_t addr, size_t size, uint32_t prot);
+void setProtection(uintptr_t addr, size_t size, uint32_t prot);
+void setProtection_mmap(uintptr_t addr, size_t size, uint32_t prot);
+void setProtection_elf(uintptr_t addr, size_t size, uint32_t prot);
 void freeProtection(uintptr_t addr, size_t size);
 void refreshProtection(uintptr_t addr);
-uint8_t getProtection(uintptr_t addr);
+uint32_t getProtection(uintptr_t addr);
 int getMmapped(uintptr_t addr);
 void loadProtectionFromMap(void);
 #ifdef DYNAREC
diff --git a/src/include/rbtree.h b/src/include/rbtree.h
index a624b5da..82695d8c 100644
--- a/src/include/rbtree.h
+++ b/src/include/rbtree.h
@@ -1,13 +1,18 @@
 #include <stdint.h>
 
+#ifndef RBTREE_H
+#define RBTREE_H
+
 typedef struct rbtree rbtree;
 
 rbtree* init_rbtree();
 void delete_rbtree(rbtree *tree);
 
-uint8_t rb_get(rbtree *tree, uintptr_t addr);
-int rb_get_end(rbtree* tree, uintptr_t addr, uint8_t* val, uintptr_t* end);
-int rb_set(rbtree *tree, uintptr_t start, uintptr_t end, uint8_t data);
+uint32_t rb_get(rbtree *tree, uintptr_t addr);
+int rb_get_end(rbtree* tree, uintptr_t addr, uint32_t* val, uintptr_t* end);
+int rb_set(rbtree *tree, uintptr_t start, uintptr_t end, uint32_t data);
 int rb_unset(rbtree *tree, uintptr_t start, uintptr_t end);
 
-void print_rbtree(const rbtree *tree);
\ No newline at end of file
+void print_rbtree(const rbtree *tree);
+
+#endif // RBTREE_H