diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-04-04 10:19:47 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-04-04 10:19:47 +0200 |
| commit | 29f65bb6beff6457db6f00315c1395f944ec93ed (patch) | |
| tree | 814655902322d3ef9b614bf9267bd9fcc0bcdf97 /src/include | |
| parent | cce929341312896c0e03ee0380d14aa3cc473964 (diff) | |
| download | box64-29f65bb6beff6457db6f00315c1395f944ec93ed.tar.gz box64-29f65bb6beff6457db6f00315c1395f944ec93ed.zip | |
More work on mmap and the MAP_32BIT flag
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/custommem.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/include/custommem.h b/src/include/custommem.h index 551063d1..15f38596 100644 --- a/src/include/custommem.h +++ b/src/include/custommem.h @@ -34,9 +34,13 @@ uintptr_t getJumpTable64(); uintptr_t getJumpTableAddress64(uintptr_t addr); #endif -#define PROT_DYNAREC 0x80 +#define PROT_DYNAREC 0x80 +#define PROT_ALLOC 0x40 +#define PROT_CUSTOM (PROT_DYNAREC|PROT_ALLOC) + void updateProtection(uintptr_t addr, uintptr_t size, uint32_t prot); void setProtection(uintptr_t addr, uintptr_t size, uint32_t prot); +void freeProtection(uintptr_t addr, uintptr_t size); uint32_t getProtection(uintptr_t addr); #ifdef DYNAREC void protectDB(uintptr_t addr, uintptr_t size); @@ -45,9 +49,8 @@ void unprotectDB(uintptr_t addr, uintptr_t size); void lockDB(); void unlockDB(); #endif -#ifndef NOALIGN void* find32bitBlock(size_t size); -#endif +void* findBlockNearHint(void* hint, size_t size); void init_custommem_helper(box64context_t* ctx); |