O'Reilly logo

Hands-On High Performance with Spring 5 by Dinesh Radadiya, Prashant Goswami, Pritesh Shah, Subhash Shah, Chintan Mehta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Heap memory

Heap memory is divided into primarily two generations: Young Generation and Old Generation. There is a PERM GENERATION that is a part of heap memory until Java 7, while from Java 8, the PERM GENERATION is replaced by METASPACE. METASPACE is not part of the heap memory but is part of the Native Memory. Set size of METASPACE using the -XX:MaxMetaspaceSize option. It is critical to consider this setting when going to production since if METASPACE takes up excessive memory, it affects the application's performance:

Java 8 memory management

The Young Generation is where objects are created and allocated; it's for young objects. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required