Search in sources :

Example 1 with CreateIsolateParameters

use of org.graalvm.nativeimage.Isolates.CreateIsolateParameters in project graal by oracle.

the class IsolatedGraalUtils method createCompilationIsolate.

public static CompilerIsolateThread createCompilationIsolate() {
    CreateIsolateParameters.Builder builder = new CreateIsolateParameters.Builder();
    long addressSpaceSize = SubstrateOptions.CompilationIsolateAddressSpaceSize.getValue();
    if (addressSpaceSize > 0) {
        builder.reservedAddressSpaceSize(WordFactory.signed(addressSpaceSize));
    }
    // Compilation isolates do the reference handling manually to avoid the extra thread.
    builder.appendArgument(getOptionString(SubstrateOptions.ConcealedOptions.AutomaticReferenceHandling, false));
    CreateIsolateParameters params = builder.build();
    CompilerIsolateThread isolate = (CompilerIsolateThread) Isolates.createIsolate(params);
    initializeCompilationIsolate(isolate);
    return isolate;
}
Also used : CreateIsolateParameters(org.graalvm.nativeimage.Isolates.CreateIsolateParameters) Builder(org.graalvm.compiler.debug.DebugContext.Builder)

Aggregations

Builder (org.graalvm.compiler.debug.DebugContext.Builder)1 CreateIsolateParameters (org.graalvm.nativeimage.Isolates.CreateIsolateParameters)1