Attempt at fixing JIT on iOS. Can only have PROT_WRITE or PROT_EXEC enabled. So toggle between them as needed.

This commit is contained in:
Sacha committed 2013-03-14 14:40:01 +10:00
1 parent 529803e429
commit f88bf8bbff
4 files changed
+20 -4

No files matched your search

+1 -1
View File
@@ -86,7 +86,7 @@ void* AllocateExecutableMemory(size_t size, bool low)
if (low && (!map_hint))
map_hint = (char*)round_page(512*1024*1024); /* 0.5 GB rounded up to the next page */
#endif
void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC,
void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_ANON | MAP_PRIVATE
#if defined(__x86_64__) && defined(MAP_32BIT)
| (low ? MAP_32BIT : 0)