For 486 and later, the emulator now allocates enough page array elements for the entire 4 GB of memory space.

This commit is contained in:
OBattler
2020-03-24 02:32:55 +01:00
parent 937befa4e7
commit 9553559019

View File

@@ -1976,11 +1976,17 @@ mem_reset(void)
m = 4096;
} else {
/* 80386+; maximum address space is 4GB. */
m = (mem_size + 384) >> 2;
if ((m << 2) < (mem_size + 384))
m++;
if (m < 4096)
m = 4096;
if (is486) {
/* We need this since there might be BIOS execution at the end of RAM,
which could break the recompiler if there's not enough page elements. */
m = 1048576;
} else {
m = (mem_size + 384) >> 2;
if ((m << 2) < (mem_size + 384))
m++;
if (m < 4096)
m = 4096;
}
}
} else {
/* 8088/86; maximum address space is 1MB. */