Fix to prevent EXC_BAD_ACCESS on iPhone
This is inelegant and should only be temporary but resolves the issue of CodeCache and ICache “getting lost” during initialization.
This commit is contained in:
parent
ff1b466116
commit
a4028154f9
|
@ -2157,7 +2157,11 @@ void armt_init()
|
|||
verify(false);
|
||||
}
|
||||
|
||||
#if TARGET_IPHONE
|
||||
memset((u8*)mmap(ICache, ICacheSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_FIXED | MAP_PRIVATE | MAP_ANON, 0, 0),0xFF,ICacheSize);
|
||||
#else
|
||||
memset(ICache,0xFF,ICacheSize);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -455,7 +455,11 @@ void recSh4_Init()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if TARGET_IPHONE
|
||||
memset((u8*)mmap(CodeCache, CODE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_FIXED | MAP_PRIVATE | MAP_ANON, 0, 0),0xFF,CODE_SIZE);
|
||||
#else
|
||||
memset(CodeCache,0xFF,CODE_SIZE);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
ngen_init();
|
||||
|
|
Loading…
Reference in New Issue