diff --git a/mx.graalpython/mx_graalpython.py b/mx.graalpython/mx_graalpython.py index f2e85d7998..30607eb510 100644 --- a/mx.graalpython/mx_graalpython.py +++ b/mx.graalpython/mx_graalpython.py @@ -527,6 +527,12 @@ def libpythonvm_build_args(): # MAP_JIT memory is mapped next to the (ASLR-slid) dylibs. build_args += ['-H:-RandomizeRuntimeCodeCache'] + if not graalos and not _is_overridden_native_image_arg("-R:+CompileInIsolates") and not _is_overridden_native_image_arg("-R:-CompileInIsolates"): + # Runtime compilation runs in a separate isolate by default, with its own heap (which starts + # with a young generation of about 48 MB) and a second mapping of the image heap that it + # touches. Compile in the main isolate instead; --vm.XX:+CompileInIsolates restores it. + build_args += ['-R:-CompileInIsolates'] + profile = None require_profile = get_boolean_env("GRAALPY_REQUIRE_PGO_PROFILE") if (