1
0
Fork 0

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:
Peter Veenstra 2007-06-27 15:22:55 +00:00
parent 4053f8693e
commit 116afb95f3
4 changed files with 4 additions and 4 deletions

View file

@ -27,7 +27,7 @@
#include <stddef.h>
#include <stdlib.h>
#if defined (_MSC_VER)
#if defined (WIN32)
#include <windows.h>
#include <winbase.h>
#endif

View file

@ -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)

View file

@ -27,7 +27,7 @@
#include <stddef.h>
#include <stdlib.h>
#if defined (_MSC_VER)
#if defined (WIN32)
#include <windows.h>
#include <winbase.h>
#endif

View file

@ -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)