Why does the (Oracle) JVM have a fixed upper limit for memory usage (-Xmx)?

后端 未结 8 741
生来不讨喜
生来不讨喜 2020-11-28 09:30

In the spirit of question Java: Why does MaxPermSize exist?, I\'d like to ask why the Oracle JVM uses a fixed upper limit for the size of its memory allocation pool.

8条回答
  •  孤独总比滥情好
    2020-11-28 10:28

    I think that the upper limit for memory is is linked to the fact that JVM is a VM.

    As any physical machine has a given (fixed) ammount of RAM so the VM has one.

    The maximal size makes the JVM easier to manage by the operating system and ensures some performance gains(less swapping).

    Sun' JVM also works in quite limited hardware architecture(embedded ARM systems) and there the management of resources is crucial.

提交回复
热议问题