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:
@@ -1976,12 +1976,18 @@ mem_reset(void)
|
|||||||
m = 4096;
|
m = 4096;
|
||||||
} else {
|
} else {
|
||||||
/* 80386+; maximum address space is 4GB. */
|
/* 80386+; maximum address space is 4GB. */
|
||||||
|
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;
|
m = (mem_size + 384) >> 2;
|
||||||
if ((m << 2) < (mem_size + 384))
|
if ((m << 2) < (mem_size + 384))
|
||||||
m++;
|
m++;
|
||||||
if (m < 4096)
|
if (m < 4096)
|
||||||
m = 4096;
|
m = 4096;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* 8088/86; maximum address space is 1MB. */
|
/* 8088/86; maximum address space is 1MB. */
|
||||||
m = 256;
|
m = 256;
|
||||||
|
Reference in New Issue
Block a user