diff options
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); |