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;
}
Aggregations