Change the PAGE_SIZE #define to be a bit safer
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@344
This commit is contained in:
parent
1591baeb42
commit
b950a89a3b
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ typedef Bit8u (*MEMORY_ReadHandler)(PhysPt pt);
|
|||
typedef void (*MEMORY_WriteHandler)(PhysPt pt,Bit8u val);
|
||||
|
||||
#define PAGE_KB 16
|
||||
#define PAGE_SIZE PAGE_KB*1024
|
||||
#define PAGE_SIZE (PAGE_KB*1024)
|
||||
#define PAGE_SHIFT 14
|
||||
#define PAGE_COUNT(A) (A & ((1 << PAGE_SHIFT)-1) ? 1+(A >> PAGE_SHIFT) : (A >> PAGE_SHIFT) )
|
||||
#define MAX_PAGES PAGE_COUNT(C_MEM_MAX_SIZE*1024*1024)
|
||||
|
|
Loading…
Add table
Reference in a new issue