Make virtual Alloc win32 specific instead of visual C specific
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2896
This commit is contained in:
parent
4053f8693e
commit
116afb95f3
4 changed files with 4 additions and 4 deletions
|
@ -27,7 +27,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined (_MSC_VER)
|
||||
#if defined (WIN32)
|
||||
#include <windows.h>
|
||||
#include <winbase.h>
|
||||
#endif
|
||||
|
|
|
@ -457,7 +457,7 @@ static void cache_init(bool enable) {
|
|||
}
|
||||
}
|
||||
if (cache_code_start_ptr==NULL) {
|
||||
#if defined (_MSC_VER)
|
||||
#if defined (WIN32)
|
||||
cache_code_start_ptr=(Bit8u*)VirtualAlloc(0,CACHE_TOTAL+CACHE_MAXSIZE+PAGESIZE_TEMP-1+PAGESIZE_TEMP,
|
||||
MEM_COMMIT,PAGE_EXECUTE_READWRITE);
|
||||
if (!cache_code_start_ptr)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined (_MSC_VER)
|
||||
#if defined (WIN32)
|
||||
#include <windows.h>
|
||||
#include <winbase.h>
|
||||
#endif
|
||||
|
|
|
@ -562,7 +562,7 @@ static void cache_init(bool enable) {
|
|||
}
|
||||
if (cache_code_start_ptr==NULL) {
|
||||
// allocate the code cache memory
|
||||
#if defined (_MSC_VER)
|
||||
#if defined (WIN32)
|
||||
cache_code_start_ptr=(Bit8u*)VirtualAlloc(0,CACHE_TOTAL+CACHE_MAXSIZE+PAGESIZE_TEMP-1+PAGESIZE_TEMP,
|
||||
MEM_COMMIT,PAGE_EXECUTE_READWRITE);
|
||||
if (!cache_code_start_ptr)
|
||||
|
|
Loading…
Add table
Reference in a new issue