Merge pull request #2869 from BrzVlad/feature-mod-union-opt
[mono.git] / mono / mini / aot-runtime.c
index 2d789a2f1767d43ecfcbce86822b9ad78132ea56..d3f3cf2e952c82b946e69b7a834082609d318d2e 100644 (file)
@@ -5222,7 +5222,9 @@ get_new_trampoline_from_page (int tramp_type)
                /* allocate two contiguous pages of memory: the first page will contain the data (like a local constant pool)
                 * while the second will contain the trampolines.
                 */
-               ret = vm_allocate (mach_task_self (), &addr, psize * 2, VM_FLAGS_ANYWHERE);
+               do {
+                       ret = vm_allocate (mach_task_self (), &addr, psize * 2, VM_FLAGS_ANYWHERE);
+               } while (ret == KERN_ABORTED);
                if (ret != KERN_SUCCESS) {
                        g_error ("Cannot allocate memory for trampolines: %d", ret);
                        break;