mirror of
https://github.com/ptitSeb/box86.git
synced 2024-11-23 18:04:10 +08:00
[DYNAREC] Fix a bug when freeing a large dynablock allocation
This commit is contained in:
parent
02423d4a2d
commit
8209cf8398
@ -421,8 +421,8 @@ uintptr_t AllocDynarecMap(dynablock_t* db, int size)
|
||||
|
||||
void FreeDynarecMap(dynablock_t* db, uintptr_t addr, uint32_t size)
|
||||
{
|
||||
if(size>MMAPSIZE) {
|
||||
munmap((void*)addr, size);
|
||||
if(size>MMAPSIZE-2*sizeof(blockmark_t)) {
|
||||
free((void*)addr);
|
||||
kh_dynablocks_t *blocks = dblist_oversized;
|
||||
if(blocks) {
|
||||
khint_t k = kh_get(dynablocks, blocks, (uintptr_t)db);
|
||||
|
Loading…
Reference in New Issue
Block a user