Reputation: 12885
How can I control the heap size of a native image created with GraalVM native-image
?
Does the native image evaluate the usual JVM -Xmx
argument?
Upvotes: 3
Views: 1262
Reputation: 42264
You can specify the heap size with -Xmx{n}
command line parameter. For instance,
./your-native-binary -Xmx16m
will set 16m heap size for Substrate VM. You can also add -XX:+PrintGC
flag to check garbage collector activity:
./your-native-binary -XX:+PrintGC -XX:+PrintGCTimeStamps -Xmx16m
Upvotes: 6