diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-06-16 12:07:22 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-06-16 12:07:22 +0200 |
| commit | ab6deeb319cf4389f0cfd555c8aa922300065ee6 (patch) | |
| tree | 2961681065d17f971083f92cb87bf2afc910d86a /src/custommem.c | |
| parent | c1785a93ab7305e530b8c265ba230154020d0a0d (diff) | |
| download | box64-ab6deeb319cf4389f0cfd555c8aa922300065ee6.tar.gz box64-ab6deeb319cf4389f0cfd555c8aa922300065ee6.zip | |
[DYNACACHE] Added the ability to mark a maplist has having new blocks (instead of dirty block that are refreshed)
Diffstat (limited to 'src/custommem.c')
| -rw-r--r-- | src/custommem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/custommem.c b/src/custommem.c index 256dd528..f23ec5d5 100644 --- a/src/custommem.c +++ b/src/custommem.c @@ -1064,6 +1064,7 @@ typedef struct mmaplist_s { blocklist_t** chunks; int cap; int size; + int has_new; } mmaplist_t; mmaplist_t* NewMmaplist() @@ -1124,7 +1125,7 @@ dynablock_t* FindDynablockFromNativeAddress(void* p) #ifdef TRACE_MEMSTAT static uint64_t dynarec_allocated = 0; #endif -uintptr_t AllocDynarecMap(uintptr_t x64_addr, size_t size) +uintptr_t AllocDynarecMap(uintptr_t x64_addr, size_t size, int is_new) { if(!size) return 0; @@ -1136,6 +1137,7 @@ uintptr_t AllocDynarecMap(uintptr_t x64_addr, size_t size) list = mmaplist; if(!list) list = mmaplist = NewMmaplist(); + if(is_new) list->has_new = 1; // check if there is space in current open ones int idx = 0; uintptr_t sz = size + 2*sizeof(blockmark_t); |