javajvmmbeans

In Java Memory Pool what is the replacement of Code Cache replacement in JAVA 11?


I see the following questions relevant - how-is-the-java-memory-pool-divided and garbage-collection-not-running-for-code-cache-memory-pool but I donot have the relevant answers.

As you see via Jconsole there is no more Code Cache available in the Memory pool, Need some details on what is its replacement and where can we find more details about the change?

enter image description here


Solution

  • I believe the restructuring came with Java 9.

    Instead of having a single code heap, the code cache was segmented into distinct code heaps, each of which contains compiled code of a particular type. Such a design enables to separate code with different properties.

    The main idea was to improve performance and enable future extensions.

    There are three different top-level types of compiled code:

    The corresponding code heaps are:

    You can find some useful details (like motivation to this restructuring, how to configure new heaps, etc.) in JEP-197 :)