diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-06-19 11:07:21 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-06-19 11:07:30 +0200 |
| commit | 725316a5386eb713438625220b561bcd3710c8bc (patch) | |
| tree | 3535222fdd3ec0c8b601df98006fa1736e9fb047 /src/include/custommem.h | |
| parent | cc9ed708379b9b03e7a9b86f040f06f178606aef (diff) | |
| download | box64-725316a5386eb713438625220b561bcd3710c8bc.tar.gz box64-725316a5386eb713438625220b561bcd3710c8bc.zip | |
[DYNACACHE] Introduced DynaCache for ARM64 (disabled by default)
Diffstat (limited to 'src/include/custommem.h')
| -rw-r--r-- | src/include/custommem.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/custommem.h b/src/include/custommem.h index 17acc1e9..96ebfdd0 100644 --- a/src/include/custommem.h +++ b/src/include/custommem.h @@ -32,11 +32,17 @@ size_t customGetUsableSize(void* p); #ifdef DYNAREC typedef struct dynablock_s dynablock_t; typedef struct mmaplist_s mmaplist_t; +typedef struct DynaCacheBlock_s DynaCacheBlock_t; // custom protection flag to mark Page that are Write protected for Dynarec purpose uintptr_t AllocDynarecMap(uintptr_t x64_addr, size_t size, int is_new); void FreeDynarecMap(uintptr_t addr); mmaplist_t* NewMmaplist(); void DelMmaplist(mmaplist_t* list); +int MmaplistHasNew(mmaplist_t* list, int clear); +int MmaplistNBlocks(mmaplist_t* list); +void MmaplistFillBlocks(mmaplist_t* list, DynaCacheBlock_t* blocks); +void MmaplistAddNBlocks(mmaplist_t* list, int nblocks); +int MmaplistAddBlock(mmaplist_t* list, int fd, off_t offset, void* orig, size_t size, intptr_t delta_map, uintptr_t mapping_start); void addDBFromAddressRange(uintptr_t addr, size_t size); // Will return 1 if at least 1 db in the address range @@ -134,6 +140,8 @@ void fini_custommem_helper(box64context_t* ctx); // ---- StrongMemoryModel void addLockAddress(uintptr_t addr); // add an address to the list of "LOCK"able int isLockAddress(uintptr_t addr); // return 1 is the address is used as a LOCK, 0 else +int nLockAddressRange(uintptr_t start, size_t size); // gives the number of lock address for a range +void getLockAddressRange(uintptr_t start, size_t size, uintptr_t addrs[]); // fill in the array with the lock addresses in the range (array must be of the correct size) void SetHotPage(uintptr_t addr); void CheckHotPage(uintptr_t addr); |