Windows x86 32-bit recompiler should now work with DEP enabled.
This commit is contained in:
parent
096f498be3
commit
4c8e892872
1 changed files with 7 additions and 0 deletions
|
|
@ -19,6 +19,9 @@
|
|||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if defined WIN32 || defined _WIN32 || defined _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
int codegen_flags_changed = 0;
|
||||
int codegen_fpu_entered = 0;
|
||||
|
|
@ -63,7 +66,11 @@ void codegen_init()
|
|||
long pagemask = ~(pagesize - 1);
|
||||
#endif
|
||||
|
||||
#if defined WIN32 || defined _WIN32 || defined _WIN32
|
||||
codeblock = VirtualAlloc(NULL, BLOCK_SIZE * sizeof(codeblock_t), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||
#else
|
||||
codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t));
|
||||
#endif
|
||||
codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *));
|
||||
|
||||
memset(codeblock, 0, BLOCK_SIZE * sizeof(codeblock_t));
|
||||
|
|
|
|||
Loading…
Reference in a new issue