简体   繁体   English

Launch4j中的maxHeapPercent参数

[英]maxHeapPercent parameter in Launch4j

In Launch4j, the memory configuration can be based on the percentage of the available memory size. 在Launch4j中,内存配置可以基于可用内存大小的百分比。 For example: 例如:

<maxHeapPercent>50%</maxHeapPercent>

specifies that the maximum heap size will be 50% of the available memory. 指定最大堆大小将为可用内存的50%。

However, I wonder if Launch4j calculate the memory by itself or actually reuse the JVM parameter -XX:MaxHeapFreeRatio ? 但是,我想知道Launch4j是自己​​计算内存还是实际重用JVM参数-XX:MaxHeapFreeRatio If so, the maximum memory will be 1Gb, according to the page: http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html#par_gc.ergonomics.default_size . 如果是的话,最大的内存将是1GB,根据页面: http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html#par_gc.ergonomics.default_size This also means that I have to look for some other tools. 这也意味着我必须寻找其他工具。

I just discover through the debug mode. 我只是通过调试模式发现的。 Launch4j does calculate the right memory amount for you. Launch4j确实会为您计算合适的内存量。 It's done. 完成。

However, it seems that it's impossible to change the memory percentage by using a .ini file: 但是,似乎无法通过使用.ini文件来更改内存百分比:

http://launch4j.sourceforge.net/docs.html#Additional_jvm_options http://launch4j.sourceforge.net/docs.html#Additional_jvm_options

The .ini file only support jvm parameters. .ini文件仅支持jvm参数。 Is this correct? 这个对吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM