Get JVM to grow memory demand as needed up to size of VM limit?

后端 未结 14 1415
渐次进展
渐次进展 2020-12-29 07:42

We ship a Java application whose memory demand can vary quite a lot depending on the size of the data it is processing. If you don\'t set the max VM (virtual memory) size

14条回答
  •  不思量自难忘°
    2020-12-29 08:03

    I don't think you can do what you are trying to do; instead you'll have to ship instructions specific to your customers, their systems and their demands of how they can modify your .cmd file to allow for more memory.

    Of course, if your product is aimed at very non-technical users, you may wish to hide this behind some more user-friendly config file. E.g.

    # HIGH, MEDIUM, LOW - please change as appropriate. The guidelines are:
    #                       * HIGH - users who generate 500 items per day
    #                       * MEDIUM - 200-500 items etc
    memoryUsage=MEDIUM
    

    or possibly deploy different config files depending on which product option a user specifies when they order the product in the first place.

提交回复
热议问题