JVM memory areas

Memory-wise, JVM is made up of two major generic storage types: stack and heap.

The JVM stack and native stack

A stack is a last in, first out (LIFO) type of storage. For each JVM thread of execution, there is a JVM stack. In this stack, entries called frames are stored. The frames can hold object references, variables values, and partial results. During the execution of a Java application, these frames are added (push) to, or removed (pop) from the JVM stack.

In JVM, there is also the concept of a native stack. Normally, there exists one stack per JVM thread, and it is used to support native (written in a platform-native language such as C/C++) functions/methods as the regular JVM stacks can't hold them.

As a concept, a stack is ...

Get WildFly Performance Tuning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.