Memory Regions of the JVM What is the difference between the Heap and Stack memory?

3

When a java application is started, you can set the memory boot directives with -Xms and Xmx to define with what minimum memory the application starts and which is the maximum it can occupy. My query is What kind of memory is affected by these parameters (-Xms, -Xmx), the Heap memory or the stack Memory?

Thank you in advance for the attention provided.

    
asked by Fabian Peñaloza 27.09.2018 в 20:01
source

2 answers

3

Edited: My original answer was incorrect.

The -Xms and -Xmx arguments only affect the memory heap, but both are included in the JVM memory.

    
answered by 27.09.2018 в 20:38
0

I understand that the command -Xmx specifies the maximum memory that the JVM will take into account for itself, while with -Xms you tell it, when it starts, with how much memory it will start.

I guess the -Xmx refers to the Stack Memory and -Xms to the Heap.

I just read it from here: link

    
answered by 27.09.2018 в 20:38