Java seems to ignore -Xms and -Xmx options

后端 未结 3 1456
陌清茗
陌清茗 2020-12-01 23:46

I\'d like to run a very simple bot written in java on my VPS. I want to limit jvm memory to let\'s say 10MB (I doubt it would need any more).

I\'m running the bot wi

3条回答
  •  有刺的猬
    2020-12-02 00:52

    Xmx is the max heap size, but besides that there's a few other things that the JVM needs to keep in memory: the stack, the classes, etc. For a brief introduction see this post about the JVM memory structure.

提交回复
热议问题