Skip to Content
Java 9 High Performance
book

Java 9 High Performance

by Mayur Ramgir, Nick Samoylov
November 2017
Intermediate to advanced
398 pages
10h 14m
English
Packt Publishing
Content preview from Java 9 High Performance

Java stack

Stack is another area you should focus on. It is the home of local variables and method invocations. Stack manages order as Last-In-First-Out (LIFO). Let’s see how it works.

Your code calls a method, then its stack frame gets created and it gets put onto the top of the call stack. This stack frame maintains the state of the method. It also keeps track of the line of code currently getting executed and the values of all the local variables. For the method on stack, it also stores references to other objects in the heap. Once the method execution ends, the stack block gets claimed and becomes available for a new method. Compared to heap, stack has less memory allocated. As you may have figured out by now, the top of the stack contains ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Distributed Computing in Java 9

Distributed Computing in Java 9

Raja Malleswara Rao Malleswara Rao Pattamsetti
Mastering Java 11 - Second Edition

Mastering Java 11 - Second Edition

Dr. Edward Lavieri Jr., Mandar Jog
Java EE 8 High Performance

Java EE 8 High Performance

Romain Manni-Bucau
Clojure: High Performance JVM Programming

Clojure: High Performance JVM Programming

Eduardo Díaz, Shantanu Kumar, Akhil Wali

Publisher Resources

ISBN: 9781787120785Supplemental Content