From ed86b4c6c1764340ad5092f3d754a0f066eb9dde Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Sun, 20 Sep 2015 11:24:22 +0200 Subject: [PATCH] JIT: allow popall creation to fail if cachesize is 0 --- jit/compemu_support.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/jit/compemu_support.cpp b/jit/compemu_support.cpp index 984f3a9a..18d58e72 100644 --- a/jit/compemu_support.cpp +++ b/jit/compemu_support.cpp @@ -3710,10 +3710,19 @@ static inline void create_popalls(void) #ifdef UAE if (popallspace == NULL) { #endif - if ((popallspace = alloc_code(POPALLSPACE_SIZE)) == NULL) { - jit_abort("Could not allocate popallspace!"); - } + if ((popallspace = alloc_code(POPALLSPACE_SIZE)) == NULL) { +#ifdef UAE + jit_log("WARNING: Could not allocate popallspace!"); + if (currprefs.cachesize > 0) { +#endif + jit_abort("Could not allocate popallspace!"); #ifdef UAE + } + /* This is not fatal if JIT is not used. If JIT is + * turned on, it will crash, but it would have crashed + * anyway. */ + return; + } } #endif vm_protect(popallspace, POPALLSPACE_SIZE, VM_PAGE_READ | VM_PAGE_WRITE); -- 2.47.3