-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
Describe the Issue
With a native-image generated shared library, setting options at isolate creation (with graal_create_isolate()) requires creating a graal_create_isolate_params_t struct, but that struct is opaque and the only documentation reference I can find mentions the fields we'd need to set, but also says they're private.
It would be great if there was a non-private way to create a graal_create_isolate_params_t in order to pass runtime configuration option like -XX:-Xmx... in.
Using the latest version of GraalVM can resolve many issues.
- I tried with the latest version of GraalVM.
GraalVM Version
openjdk 25.0.1 2025-10-21
OpenJDK Runtime Environment GraalVM CE 25.0.1+8.1 (build 25.0.1+8-jvmci-b01)
OpenJDK 64-Bit Server VM GraalVM CE 25.0.1+8.1 (build 25.0.1+8-jvmci-b01, mixed mode, sharing)
Troubleshooting Confirmation
- I tried the suggestions in the troubleshooting guide.
Additional Context
Here's the relevant section of the generated graal_isolate.h:
/* Parameters for the creation of a new isolate. */
enum { __graal_create_isolate_params_version = 4 };
struct __graal_create_isolate_params_t {
int version; /* Version of this struct */
/* Fields introduced in version 1 */
__graal_uword reserved_address_space_size; /* Size of address space to reserve */
/* Fields introduced in version 2 */
const char *auxiliary_image_path; /* Path to an auxiliary image to load. */
__graal_uword auxiliary_image_reserved_space_size; /* Reserved bytes for loading an auxiliary image. */
/* Fields introduced in version 3 */
int _reserved_1; /* Internal usage, do not use. */
char **_reserved_2; /* Internal usage, do not use. */
int pkey; /* Isolate protection key or domain. */
/* Fields introduced in version 4 */
char _reserved_3; /* Internal usage, do not use. */
char _reserved_4; /* Internal usage, do not use. */
};
typedef struct __graal_create_isolate_params_t graal_create_isolate_params_t;