Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何控制使用 GraalVM 创建的本机映像的堆大小native-image?
native-image
本机映像是否评估通常的 JVM-Xmx参数?
-Xmx
-Xmx{n}您可以使用命令行参数指定堆大小。例如,
-Xmx{n}
./your-native-binary -Xmx16m
将为 Substrate VM 设置 16m 的堆大小。您还可以添加-XX:+PrintGC标志来检查垃圾收集器活动:
-XX:+PrintGC
./your-native-binary -XX:+PrintGC -XX:+PrintGCTimeStamps -Xmx16m